Skip to content

Instantly share code, notes, and snippets.

@AlbionaHoti
Created July 7, 2020 10:41
Show Gist options
  • Save AlbionaHoti/41f9492599941a216ce09c68f73406a2 to your computer and use it in GitHub Desktop.
Save AlbionaHoti/41f9492599941a216ce09c68f73406a2 to your computer and use it in GitHub Desktop.

Update the forked repo with git rebase

  1. Add the remote (original repo that you forked) and call it “upstream”

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

  1. Fetch all branches of remote upstream

git fetch upstream

  1. Rewrite your master with upstream’s master using git rebase.

git rebase upstream/master

  1. Push your updates to master. You may need to force the push with “--force”.

git push origin master --force

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment