Skip to content

Instantly share code, notes, and snippets.

@JamieHouston
Last active August 30, 2017 17:41
Show Gist options
  • Save JamieHouston/ab04f0f8df134bc21298777a608c645c to your computer and use it in GitHub Desktop.
Save JamieHouston/ab04f0f8df134bc21298777a608c645c to your computer and use it in GitHub Desktop.
sync fork with upstream
git fetch --all
# reset master to upstream/master
git checkout master
git reset --hard upstream/master
git push --force
# replay the patches (even they are rejected for now) on top of master
git checkout mybranch
git rebase master
git push -u origin mybranch
# from https://stackoverflow.com/questions/29049650/github-fork-your-branch-is-5-commits-ahead-how-to-clean-this-without-pushing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment