Search code examples
gitgnupgpgp

git gpg sign everything


I am trying to sign every operation I do via git.

sign commit

git commit -S -am 'message'

sign tag

git tag -s -a <tag>

sign merge

git merge -S <branch>

However one problem remains. When I simply pull, it sometimes automatically creates a merge with the pull which is not signed.

So how can I sign a merge that is done by git pull?


Solution

  • Not sure if that will be good enough for you, but you can pull without the merge commit, and perform the commit manually

    git pull --no-commit
    git commit -S -am 'The merge commit'