Questions tagged [git]

Git is an open-source distributed version control system (DVCS). Use this tag for questions related to Git usage and workflows. DO NOT USE [tag:github] tag for Git-related issues simply because a repository happens to be hosted on GitHub. Also, do not use this tag for general programming questions that happen to involve a Git repository.

0
votes
0answers
4 views

JGit: git log -m --oneline --full-history File.java (Show all commits, incl. merged, for file)

I am trying to retrieve a list of all commits affecting a file, including the commits on another branch, which is merged into the master branch (renames should be ignored, i.e., no --follow). More ...
-1
votes
0answers
8 views

ERROR [launcher]: ChromeHeadless stderr: No such file or directory

I setup job in gitlab and there i used browsers as ChromeHeadlessNoSandbox in karma.conf.js file and in package.json file i have given the below version- "karma": "^1.7.1", "karma-chrome-launcher":"^...
1
vote
1answer
11 views

Is it possible to create a project to be the predecessor of existing projects? Some kind of pre-fork project?

I work in the front-end architecture department and we maintain several skeleton projects. In these, we define the basics that other teams use to start their own projects. We create some code to start ...
-1
votes
1answer
11 views

Interactive online websites to learn new technologies

I'm looking for websites that are very interactive, like https://learngitbranching.js.org/ for git, or https://flexboxfroggy.com/ for flexbox. Do you have some ? (I'm looking for something in SQL, but ...
-1
votes
0answers
15 views

Can anyone explain this git log output?

I modified feature/delegates, committed and pushed. I merged feature/delegates into development, committed and pushed. I merged development into 'master', committed and pushed. So why does my git log ...
0
votes
0answers
18 views

After git clone files in bin folder become not executable

I'v got Rails' app git repository with some executable files in bin directory. With permissions 646 -rwxr-xr-x each. I double checked and permissions are set correctly in git repository, but when I ...
0
votes
0answers
23 views

remote: Repository not found error in git

I am facing the following problems while trying to push a branch in origin. So, what I have done is, created a new branch and add a commit on it. Then tried to push. It shows, fatal: The current ...
-1
votes
1answer
20 views

Find the last person that changed a specific line in a Git repo

Is there a way to see the changes on a specific line on a file? For example: Line 84 on file index.html. This is the same question as in "See who last changed a specific line in a Git repo", which ...
1
vote
1answer
25 views

How to do proper Git compatible hex sha packing/compression in Go

I am going through the book Building Git by James Coglan, where James walks you through implementing a basic version of Git in Ruby. I decided to make things more complicated for myself by doing my ...
0
votes
1answer
25 views

Git: How to understand the 'git branch -a --merged master' listing

When on master branch I executed the following commands: git fetch git branch -a --merged master I got the following listing: $ git branch -a --merged master branch1 branch2 * master remotes/...
2
votes
2answers
41 views

Git: How to get a list of pushed branches to remote master?

Maybe I am confusing terms here. Please explain. I know how to get a list of merged branches on remote master: $git branch -r --merged master But how can I get the list of pushed branches to remote ...
0
votes
2answers
22 views

Made changes on a feature branch after it was already merged to master

I have a feature branch that another dev merged into master and I spent the last 2 hours still adding commits to the feature branch before knowing the feature branch was merged earlier already. What ...
1
vote
1answer
15 views

Is there a specific hook that is executed on git submodule update?

I'd like to ask if there is a possible way that a hook is executed on git submodule update; possibly like a post-update hook? thanks! :) I like to execute a script (for now it just contains echo msg) ...
1
vote
1answer
13 views

install git-recover to recover files from hard reset

I staged some changed and then did a hard reset on a repository, before doing the first commit. As a result, I lost many files. I'd like to recover those files. I was told that by installing git-...
1
vote
1answer
21 views

Is it possible to push code into bitbucket into a non-existent repository?

My project structure is as below: Project1: --Repository 1 --Repository 2 --Repository 3 -- -- --Repository 8 I use bitbucket and I have the Project1 created already. But I don't want to create the ...
0
votes
1answer
33 views

How to ensure a file is completely ignored by git?

After each run of my Rails test suite, RSpec persists the status of all tests to spec/examples.txt. This means that if I git commit my staging branch and then later run tests, examples.txt is ...
0
votes
1answer
13 views

How to update a cloned branch

I am cloning a branch using the below code git clone -b branch remote_repo It clones fine, but now I would like to update it as the branch owner changed code. How do I go about doing that.
1
vote
1answer
25 views

How do I use GitHub and Git to create a branch the correct way

Solo dev who is finally decided to use git and github instead of multiple versions on my hard drive. I have created an initial master branch that I uploaded the current state of my project to. I am ...
0
votes
0answers
10 views

On EC2 how to chown / chmod .config/git files in /home/ubuntu [duplicate]

I am logged into an EC2 Ubuntu instance as the ubuntu user so my user home is just /home/ubuntu. Whenever I run git commands on the ec2 server I get errors like: warning: unable to access '/home/...
2
votes
1answer
43 views

Why does “. myscript” return file-not-found in only one Git for Windows sh.exe?

I have downloaded Git from here. I recently discovered there's two copies of sh.exe, which provides a bash shell. C:\Program Files\Git\bin\sh.exe C:\Program Files\Git\usr\bin\sh.exe I have come to ...
0
votes
1answer
19 views

git reword shows merge conflict during rebase, however pick works correctly

I am trying to rebase a branch with another branch with few commits. Although commits includes merge commits i am able to rebase it successfully with below command git rebase -i -r -m <base_branch&...
0
votes
0answers
17 views

Is it possible to flag code as debug only or flag for delete in PhpStorm or Git so I don't accidentally check it in?

Scenario I'm debugging an install script which of course only runs when the database and code have different version numbers. For easy debugging I simply temporarily write the upgrade code to an easy ...
0
votes
3answers
38 views

git how to do first commit after creating a repository

I work with git. I created a directory reflections4 and I copied a file in it. After this, I executed git init. git log displays carlotavina (master #) reflections4 $ git log fatal: your current ...
0
votes
0answers
13 views

Pull request from local to remote on the same branch

I am working with bitbucket. I have made changes to a particular branch on my local machine. Is it possible to make a pull request on the same branch? I have not found anyway to do it just yet but I ...
1
vote
1answer
23 views

git squash older commits (not last one)

I have a very messy git history. I want to squash a bunch of older commits (not including the last one). I know how to squash my last n commits. But this is different. Here I have commits ...
0
votes
0answers
16 views

How to: At push/merge to master, commit/push specific files to another project

When a user merges to master, merge those files to another project master the user doesn't have access to. I'm giving non-technical users access to edit some config files, that I then push to ...
0
votes
1answer
35 views

Checkout a single file so that history is retained

My aim is to create a new github repo, containing some files from a repo that I have forked (and then effectively forked within my own github, using http://deanmalone.net/post/how-to-fork-your-own-...
1
vote
1answer
28 views

How do I get my Github repository to reflect a merge on my machine?

After successfully merging a branch with my master branch, when I checkout my master branch, it says I’m ahead by 4 commits. The commits are from the merged branch. In other words, the master branch ...
0
votes
1answer
11 views

How do I reopen an issue in Jira that I created and closed myself?

I accidentally closed an issue in Jira whilst still having the issue checked out in sourcetree. To push that commit I need an open issue with the same name in Jira but I closed it and cannot open it. ...
0
votes
0answers
30 views

Can't push to organization repository and I'm the owner

I just converted one of my GitHub pages to an organization and made my personal GitHub username the owner of this organization. However, I still can't write changes to the GitHub repository. I noticed ...
2
votes
2answers
34 views

How can I create a clean, but linked Git repository for public consumption?

I've been working with a colleague to tidy up some code that was written some time ago. It's all in a Github repository (private) and there are many branches and commits recording the long transition ...
0
votes
1answer
42 views

How to get the branch name created recently

I am using Bit-Bucket and I've almost 50 branches has been created so far and I am not sure how to fetch the following details either using command line or in Bit-Bucket UI tool? Name of the last ...
0
votes
1answer
18 views

How to upload ignored files to github repository

In my local repository, I have 8 files But in I have specified to ignore .mat files in .gitignore. So when pushing the repository on github, the ignored files are not added. But I want anyone who ...
0
votes
1answer
17 views

Work with git on a subdir from upstream while keeping merge capabilities in tact

Is there a way to create a new repo (or branch, that would work fine as well) from an upstream project's subdirectory, while keeping merge capabilities in tact? Example: Upstream uses a monorepo ...
0
votes
0answers
13 views

Not able to commit changes made in ipynb file to github

I have a ipynb file that's both on github as well as my PC. I have made changes to the one on my PC, and want to commit those changes. I run the usual commands to do so, and all of they work without ...
0
votes
1answer
16 views

Import GIT Repository files into TFS without any GIT baggage

I have inherited a GIT repository from which I would like to extract the files only and no GIT related aspects or files. I want to do this because I want to put the entire folder tree into TFS without ...
0
votes
0answers
9 views

How do I trigger a Jenkins Pipeline for a LOCAL git repository, using Git Hooks?

I'm sure I missing a trick here. Here's my post-commit Git Hook: #!/bin/sh # # Run a build on commit. CRUMB=$(curl -s 'http://admin:1qaz@localhost:8080/crumbIssuer/api/xml?xpath=concat(//...
0
votes
0answers
19 views

git ssh always Connecting

I install YCM for my vim today, and then my git can't work with ssh but still can work with https. When I git push | pull | clone, it response nothing. Like this img: If I change the remote origin ...
-2
votes
0answers
30 views

Best git or github cheatsheet for beginners? [on hold]

Could you recommend me a good github / git cheatsheet with an common git workflow on a page? I'm an git hub beginner and I'm always looking for cheatsheets making my life easier.
1
vote
0answers
24 views

GIT > 20k new files cause freeze of Git, “Too many active changes”

I am trying to add a folder that has to be tracked, however it is > 1GB / > 20k files. As soon I add it, I will get warning about too many active changes and Git simply will refuse to work correctly ...
2
votes
1answer
21 views

How to push changes to an un-merged PR?

I'm using a git alias by which I can get an un-merged PR to my local computer. This is what the alias looks like: pr ="!f() { git co better-master && git fetch origin && git ...
0
votes
0answers
19 views

How to create GitLab merge requests with multiple commits

I'm a newbie to GitLab. When I try to create a merge request it only shows the final commit, but the 2 previous commits are not shown. Actually I don't need to add the failed (with red cross) commit ...
0
votes
1answer
19 views

How to update folder in master branch when updating a branch using GIT?

Here is the problem. I'm my git repo(Laravel application) I have three branches master, dev and html. master branch(Laravel application) ... public resources |-assets |-sass routes ... ...
2
votes
1answer
52 views

Haunted image in git

I have uploaded new images in my project solution. They are committed and pushed to my bitbucket repository. Now each time after I commit local changes (totally unrelated to the previously uploaded ...
0
votes
1answer
18 views

How to use git with sftp?

I need to work on some php projects which are located on an sFTP server. What I need to accomplish is: Work with Visual Studio Code IDE Use git through the VSCode to commit changes locally Push repo ...
1
vote
0answers
34 views

force put a single file into conflicted merge state

An upstream branch (not master/default HEAD, if that matters) has a few updates I want, most other differences I don't. First, I did git fetch -v upstream rather than pull since I don't want my local ...
0
votes
0answers
15 views

Singularity; get a github repo into the users home directory

Aim The aim is to create a singularity container that installs some packages, then clones a custom package from a git repo and makes it. The user needs to have permission to do things with the custom ...
1
vote
1answer
22 views

Switch submodule URL with different commits results in “not a tree”

I need to switch a submodule of a project with one I created. The new submodule is in a repo I own. I forked the main project repo. I modified the .gitmodules file with the URL of the new repo ...
0
votes
0answers
22 views

Push missing file to git lfs

Unfortunately, I introduced an error in my .gitattributes some weeks (and commits and pushes) ago. As a result the .gitignore of a subfolder of my project is assumed to be on git lfs. But for some ...
0
votes
1answer
36 views

Will the uncommitted change also will push along in Git?

We follow the Gitflow model. I am trying to merge my branch to develop now. But I have some uncommitted changes also in my branch. I merged successfully. Now the question is when i push my changes ...

http://mssss.yulina-kosm.ru