Skip to content

Instantly share code, notes, and snippets.

@RichieRunner
Last active May 2, 2020 08:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RichieRunner/b13d49f559bcd2d21e0bf3227b907bad to your computer and use it in GitHub Desktop.
Save RichieRunner/b13d49f559bcd2d21e0bf3227b907bad to your computer and use it in GitHub Desktop.
rebase forked repo with master branch from upstream
  1. CD into your current forked repo
  2. Add the remote repo and call it upstream
git remote add upstream https://github.com/original-repo/goes-here.git
  1. Fetch all branches from remote upstream
git fetch upstream
  1. Rewrite your forked master with the upstream's master using git rebase
git rebase upstream/master
  1. Force push to master
git push origin master --force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment