f0i f0i - 1 month ago 13
Git Question

GPG sign all git commits without stash

git 2.0 has the config option

commit.gpgsign
which will sign all commits.

This will also apply for
git stash
and will ask for the password of my gpg key.

Is ther a way to automatically sign all commits, tags,... but exclude stashes?

Answer

This is alias territory:

git config --global alias.stashq '-c commit.gpgsign=false stash'
Comments