agaskar.com

Dec 30 2009

Tracking a remote fork locally with Git

git add remote SomeRemote git://github.com/SomeRemote/some-project.git
git fetch SomeRemote
git branch --track SomeRemote SomeRemote/master
git checkout SomeRemote
Now you’ve got a local branch (named after the user who created it) that is tracking changes to that repo. Meaning if you
git pull
in there, you’ll get their latest changes. If you’ve got someone you frequently collaborate with who makes changes to their own fork, this is super handy.

Comments (View)
Page 1 of 1
blog comments powered by Disqus