git-up icon indicating copy to clipboard operation
git-up copied to clipboard

Checkout untracked branches

Open Fryie opened this issue 10 years ago • 0 comments

Just wondering if you would consider this behaviour (maybe configurable by an option setting) to be inside of the scope of this project?

I often have the case that there are new branches on the remote that I would like to automatically checkout and track, so this would be nice.

FWIW, the following bash snippet seemed to work for me (although it may be dependent on the exact git version), see this SO answer:

for b in `git branch -r | grep -v -- '->'`; do git branch --track ${b##origin/} $b; done

Fryie avatar Feb 26 '15 10:02 Fryie