Custom Search

Saturday, May 26, 2012

how to checkout, track and pull all remote git branches as local branches

how to checkout, track and pull all remote git branches as local branches

1) Type this command in one line and run
#for remote in `git branch -r | grep -v master `; 
do git checkout --track $remote ; done
 
2) 
#git branch 
 
3)
#git checkout somebranch
#git pull

4)
#git branch -a
 
5)
#git branch -r

No comments:

Post a Comment