Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have one command to create local branches that track all remote branches #4

Open
peakpg opened this issue Jan 16, 2012 · 0 comments
Open

Comments

@peakpg
Copy link
Owner

peakpg commented Jan 16, 2012

Using basic Git, if you have a project that has one or more remote branches, you have to manually create a local tracking branch for each remote. Example:

$ git branch -a
* master
  remotes/origin/3.0-stable
  remotes/origin/3.1-stable
  remotes/origin/3.3.x
  remotes/origin/HEAD -> origin/master
  remotes/origin/master

This has 4 remote branches (master, 3.0-stable, 3.1-stable, 3.3.x). As per [this article](http://gitready.com/beginner/2009/03/09/remote-tracking-branches.html_To create a local branch, you need to do the following 4 times:

git branch --track 3.1-stable origin/3.1-stable

It would be nice if the tool could just do this automatically, like:

gd track-remotes

Could even ask questions of the user (to skip or rename local branches).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant