Linked Questions
54 questions linked to/from How to track all remote Git branches as local branches?
-2 votes
1 answer
1k views
How to pull all remote branch as local branch [duplicate]
I have clone the remote repo to local machine. git clone https://my_name/repo/project.git Now the local repo has 1 master branch while remote repo has 10-15 branches. git branch -a *master *remotes/...
204 votes
14 answers
86k views
Listing each branch and its last revision's date in Git
I need to delete old and unmaintained branches from our remote repository. I'm trying to find a way with which to list the remote branches by their last modified date, and I can't. Is there an easy ...
333 votes
7 answers
72k views
What is the difference between $(command) and `command` in shell programming?
To store the output of a command as a variable in sh/ksh/bash, you can do either var=$(command) or var=`command` What's the difference if any between the two methods?
330 votes
4 answers
286k views
Difference between git checkout --track origin/branch and git checkout -b branch origin/branch
Does anybody know the difference between these two commands to switch and track a remote branch? git checkout -b branch origin/branch git checkout --track origin/branch I think both keep track of the ...
67 votes
5 answers
43k views
How to update my fork to have the same branches and tags as the original repository on github?
When you fork a repository on github your forked repo contains all branches and tags. Over time these branches and tags gets outdated. How does one as easy it is with fork make sure your fork has ...
30 votes
3 answers
51k views
'git checkout' docs claim working tree will change; why are edits not discarded?
I am new to Git and trying to wrap my head around the way branches work. According to the documentation, git checkout: Updates files in the working tree to match the version in the index or the ...
55 votes
4 answers
90k views
Git pull all branches from a remote repository
How do I pull all of the remote branches to my own repository? If I type: git branch -a I get a long list of branches, but if I type: git branch I see only two of them. How do I pull all branches ...
45 votes
6 answers
18k views
Git - Automatically fast forward all tracking branches on pull
I've set up tracking branches with the --track option, and when I do a git pull on master, it fetches all branches to origin/branchname but doesn't merge with the local tracking branches. This is ...
18 votes
2 answers
54k views
Can't see remote branch
I'm stil learning git and not sure how some basic things work. I created a local branch by doing: git branch AppStore I can't remember exactly how I pushed this branch to github.com, but I can see ...
20 votes
3 answers
47k views
Git is not showing all branches on local
I forked a repo from Github. On doing git remote -v it displays: origin https://github.com/myusername/moodle.git (fetch) origin https://github.com/myusername/moodle.git (push) upstream https://...
13 votes
3 answers
16k views
How to push 2 branches from local to remote repo in git?
I have 2 branches in my local, for example: FirstApp SecondApp How to push both of them to remote repo? Do I also need to create two branches in remote as well? Many thanks!
21 votes
1 answer
31k views
How do I get `git clone --recursive` to recreate submodules' remotes and branches?
I have a project with a handful of submodules. Many of them are cloned from a GitHub fork to which I've added a branch for my custom mods. A typical setup is like thus: In local folder: MyProject1/...
20 votes
2 answers
2k views
Firedrill: Recreate Github (or any other central) repository from developers clones
Say you have a scenario with a central master git repository, which developers and CI-engines clone from. I.e. very close to a traditional non-distributed version control system setup, with a central ...
10 votes
2 answers
10k views
Pull all branches from origin
I can say this: git push --all origin and it will push all branches to origin. But if I do this: git pull --all origin then it doesn't pull all the branches from origin, it just returns an error: ...
9 votes
2 answers
8k views
IntelliJ - How to use a different ssh key
I have 2 github accounts A company one and a personal one I use cygwin to manage my ssh keys and connect to Github Everything works fine In IntelliJ when using the corporate account since it uses ...