Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to sign-off ("signed-off-by") a Git commit in PyCharm?

I wonder how I can add the "signed-off-by" line in a Git commit automatically within PyCharm's Commit dialog.

There are options for amending to the previous commit and changing the author of the commit, but I couldn't find an option for adding the signed-off line (git commit -s) on a per-commit basis.

Is it even possible or is it a missing feature?

like image 403
Torbjörn Avatar asked Jan 23 '14 07:01

Torbjörn


1 Answers

For anyone getting this answer in google searches, here is the solution as tested in Ubuntu 16.04:

echo 'no-tty' >> ~/.gnupg/gpg.conf
echo 'use-agent' >> ~/.gnupg/gpg.conf

Then you can:

git config --global format.signoff true

This will set git to always sign-off, and set gpg to use a gtk popup to ask for your key password when needed and avoid errors in pycharm.

Hope that helps someone.

like image 181
miigotu Avatar answered Sep 21 '22 11:09

miigotu