Skip to content

Instantly share code, notes, and snippets.

@cookieguru
Created May 5, 2017 23:24
Show Gist options
  • 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 [email protected]: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