Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 347
f0i Avatar asked Jun 26 '14 10:06

f0i


People also ask

How do you always sign commits?

To sign all commits by default in any local repository on your computer, run git config --global commit. gpgsign true .

How do I turn off commit sign?

You can disable this by running git config commit. gpgsign false This sets the configuration locally instead of globally. Save this answer.


1 Answers

This is alias territory:

git config --global alias.stashq '-c commit.gpgsign=false stash'
like image 185
jthill Avatar answered Oct 22 '22 04:10

jthill