Even though GitHub and many other Git management platforms can squash commits, they do not always sign the squashed commit with a GPG key. However, if you manually squash all of your commits into one, and then sign that commit before merging the pull request, you can keep your signed commit as you merge it another branch.
This code sample assumes that your target merge branch is develop
. Notice the -S
on the commit, which signs it.