Is there way to squash and merge a Pull Request with my GPG signing via command line? Merging a Pull Request on UI doesn't supports GPG signing. I've tried to merge via git merge --squash, but it doesn't close the Pull Request automatically.
Asked
Active
Viewed 1,590 times
10
Vadim Kotov
- 7,766
- 8
- 46
- 61
okuryu
- 221
- 1
- 9
1 Answers
14
The "Squash and merge your pull request commits" is a server-side option which, indeed, does not support gpg signing.
That means you need to:
- fetch the pull request in a local clone
git merge --squash, with the--gpg-signoption- push the new merge commit
- use the GitHub API to update the Pull Request state or manually close the pull request.
It is a manual and somewhat convoluted process, but it will work.
VonC
- 1,129,465
- 480
- 4,036
- 4,755
-
Will this only show the key for the person merging or will it also show the original keys? – Alexis Tyler Jul 07 '18 at 04:20
-
1@AlexisTyler The merge commit should show your key (with a "verified", as shown in https://help.github.com/articles/signing-commits-using-gpg/) – VonC Jul 07 '18 at 04:24
-
all good. Just wanted to clarify for the answer since you didn't mention that. – Alexis Tyler Jul 07 '18 at 04:25