Skip to content

Instantly share code, notes, and snippets.

@notmandatory
Last active March 24, 2022 07:37
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save notmandatory/20076477a6c2b8b37b53e75d82afda03 to your computer and use it in GitHub Desktop.
Save notmandatory/20076477a6c2b8b37b53e75d82afda03 to your computer and use it in GitHub Desktop.
Manual merge PRs to preserve commit signatures
# from target repo clone directory
# make sure you're in sync with origin
git checkout master
git fetch --all
git pull upstream master
# fetch PR to FETCH_HEAD
git fetch upstream pull/<PR#>/head
# double check the changes
git diff master FETCH_HEAD
# merge to master and push to upstream (github)
git merge FETCH_HEAD
git push upstream
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment