Skip to content

Instantly share code, notes, and snippets.

@artfuldev
Forked from notmandatory/gh_manual_merge_pr.txt
Last active January 24, 2022 18:44
Show Gist options
  • Save artfuldev/3b676a1715ea930c627eeff5c3041f5b to your computer and use it in GitHub Desktop.
Save artfuldev/3b676a1715ea930c627eeff5c3041f5b 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 origin master
# fetch PR to FETCH_HEAD
git fetch origin pull/<PR#>/head
# double check the changes
git diff master FETCH_HEAD
# merge to master and push to origin (github)
git merge FETCH_HEAD
git push origin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment