Skip to content

Instantly share code, notes, and snippets.

@concosminx
Created December 11, 2023 11:24
Show Gist options
  • Save concosminx/d66815b4d5376511cb400059cdfce249 to your computer and use it in GitHub Desktop.
Save concosminx/d66815b4d5376511cb400059cdfce249 to your computer and use it in GitHub Desktop.
How to update a forked repo with git rebase

add original repo, fetch all branches, rewrite your master with upstream master

git remote add upstream https://github.com/original-repo/goes-here.git
git fetch upstream
git rebase upstream/master

add force if you need it

git push origin master --force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment