Linked Questions

1196 votes
15 answers
1.2m views

How does git submodule add -b work? After adding a submodule with a specific branch, a new cloned repository (after git submodule update --init) will be at a specific commit, not the branch itself (...
Ivan's user avatar
  • 105k
788 votes
12 answers
382k views

When I run: git push origin branchname What exactly is origin and why do I have to type it before the branch name?
enchance's user avatar
  • 30.7k
812 votes
5 answers
1.2m views

I was accidentally working on a branch I shouldn't have been for a while, so I branched off of it giving it the appropriate name. Now I want to overwrite the branch I shouldn't have been on to the ...
Brad Herman's user avatar
  • 10.9k
584 votes
4 answers
251k views

What is the difference between origin and upstream on GitHub? When a git branch -a command is executed, some branches it displays have a prefix of origin (remotes/origin/..) while others have a prefix ...
jan's user avatar
  • 6,211
261 votes
7 answers
138k views

The man page says that log shows the commit logs and reflog manages reflog information. What exactly is reflog information and what does it have that the log doesn't? The log seems far more detailed.
Noich's user avatar
  • 15.7k
207 votes
8 answers
218k views

I am new in git and I am practicing. I created a local branch but I saw that when I did git push my branch was not uploaded to the repository. I had to actually do: git push -u origin --all. Why is ...
Cratylus's user avatar
  • 54.3k
359 votes
3 answers
155k views

I have two different versions of git. In the 1.6.2 version, git push does not have the -u option. It only appears in the 1.7.x version. From the docs, the -u is related to the variable branch.<...
Frankie Ribery's user avatar
266 votes
6 answers
221k views

Can someone explain a "tracking branch" as it applies to git? Here's the definition from git-scm.com: A 'tracking branch' in Git is a local branch that is connected to a remote branch. When you ...
jerhinesmith's user avatar
  • 15.6k
214 votes
5 answers
53k views

When doing a git rebase, I often have difficulty working out what is happening with the 'local' and 'remote' when resolving conflicts. I sometimes have the impression that they swap sides from one ...
Benjol's user avatar
  • 67k
219 votes
5 answers
157k views

Suppose that I would like to implement a fix to a project of someone else. That project resides on GitHub. I could create a fork on GitHub and implement the fix. However, I would like to create my ...
Cimlman's user avatar
  • 3,884
166 votes
8 answers
113k views

In following example tree: A-B-C-D-E (master branch) \ F-G-H (xxx branch) I'm looking for F - the first commit in xxx branch. I think that it is possible with: git log xxx --not master and ...
user2699113's user avatar
  • 4,619
217 votes
2 answers
125k views

I have some local files, I pull from remote branch and there are conflicts. I know that I would like to keep my local changes and ignore the remote changes causing conflicts. Is there a command I can ...
Tom DeMille's user avatar
  • 3,277
202 votes
3 answers
100k views

I have two SVN projects in use from another SVN repository using svn:externals. How can I have the same repository layout structure in Git?
dsimard's user avatar
  • 7,448
88 votes
7 answers
22k views

Is there a way to set up a git repository, so that git pull defaults to one remote and git push defaults to another? I know I can set both by changing the value of the remote variable in branch ...
svick's user avatar
  • 247k
61 votes
4 answers
188k views

I want to logout from Git bash and login it again as another user . I have googled but can't find any solution.
Nisar's user avatar
  • 6,098

15 30 50 per page
1
2 3 4 5
11