Skip to content

Instantly share code, notes, and snippets.

@cookieguru
Created May 5, 2017 23:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cookieguru/c75c4f6ef0b0f6a5ab5c9a36a411bc8e to your computer and use it in GitHub Desktop.
Save cookieguru/c75c4f6ef0b0f6a5ab5c9a36a411bc8e to your computer and use it in GitHub Desktop.
Updating a fork using git rebase instead of merge
git clone git@github.com:yourname/repo-name.git
cd repo-name
git remote add upstream https://github.com/original-user/repo-name.git
git checkout master
git fetch upstream
git rebase upstream/master
git push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment