Skip to content

Instantly share code, notes, and snippets.

@christianb
Last active September 11, 2020 22:06
Show Gist options
  • Save christianb/f20193a800e2f8a203498e3e8b986411 to your computer and use it in GitHub Desktop.
Save christianb/f20193a800e2f8a203498e3e8b986411 to your computer and use it in GitHub Desktop.
Update a forked Repository
# https://stackoverflow.com/questions/7244321/how-do-i-update-a-github-forked-repository
# Add the remote, call it "upstream":
git remote add upstream https://github.com/whoever/whatever.git
git fetch upstream
git fetch --tags upstream
git checkout master
# Rewrite your master branch
git rebase upstream/master
git push origin master
git push --tags origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment