Skip to content

Instantly share code, notes, and snippets.

@pithyless
Created January 1, 2012 17:52
Show Gist options
  • Save pithyless/1547905 to your computer and use it in GitHub Desktop.
Save pithyless/1547905 to your computer and use it in GitHub Desktop.
Git track upstream repo
One time:
git remote add upstream git@github.com:foo/bar.git
git fetch upstream
git checkout -b upstream upstream/master
Each time you want to update:
git checkout upstream
git pull
git checkout master
git rebase upstream
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment