1

When I create a commit with git using command line, the commit message is not altered.

When I create a commit though PhpStorm's GUI with the checkbox “Sign-off commit” checked, PhpStorm add this line at the end of my commit message:

Signed-off-by: Firstname Lastname <me@example.com>

How to prevent this? I don't want PhpStorm to write “Signed-off-by: …” at the end of every commit.


Here is my git configuration:

$ git config --list
commit.gpgsign=false
user.signingkey=…
user.name=Firstname Lastname
user.email=me@example.com
push.default=current
core.excludesfile=/home/…/.gitignore_global
fetch.prune=true
rebase.autosquash=true
gpg.program=gpg2
format.signoff=false
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=git@github.com:Victoire/victoire.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
commit.gpgsign=true
A.L
  • 10,259
  • 10
  • 67
  • 98
  • uncheck the "sign off" checkbox. this is a functionality of git, not PhpStorm. – ddavison Jan 12 '18 at 15:33
  • @sircapsalot but the git CLI does not add this line, it looks like it comes from PhpStorm. – A.L Jan 12 '18 at 15:34
  • the git CLI, you are able to sign off commits using `-s`. `git commit -s ...` that checkbox allows for that. try committing, without having that "signoff commit" checkbox in PhpStorm checked – ddavison Jan 12 '18 at 15:34
  • @sircapsalot I created a new commit and unchecked “Sign-off commit”, it asked for my passphrase. So the role of the “Sign-off commit” checkbox is to add this text? I thought its role was to enable or disable GPG signing… – A.L Jan 12 '18 at 15:39
  • that checkbox definitely puts that in, yes. It's a visual indicator, mostly.. It tells whomever that looks at it that "this is a properly open-source licensed commit." don't think it has anything to do with GPG signing – ddavison Jan 12 '18 at 15:43
  • Thanks for your help. I think that the label of the “Sign-off commit” checkbox is confusing… – A.L Jan 12 '18 at 15:44
  • my pleasure! I wrote an answer there with a little more of a detailed description of our dialog – ddavison Jan 12 '18 at 15:55

2 Answers2

3

The "Signed-off-by" message actually originates from Git, not PhpStorm.

You can disable this sign-off message by unchecking the "Sign-off commit" checkbox.

Taken from this answer regarding signing-off commits.

Add Signed-off-by line by the committer at the end of the commit log message. The meaning of a signoff depends on the project, but it typically certifies that committer has the rights to submit this work under the same license and agrees to a Developer Certificate of Origin (see http://developercertificate.org/ for more information).

FYI, this should not be confused with "Signing" commits. Signing commits has to do with GPG keys, while "signing-off" has to do with just the arbitrary message that is suffixed to the commit.

ddavison
  • 28,221
  • 15
  • 85
  • 110
0

The “Sign-off commit” checkbox has to be unchecked so that nothing is added to the commit message.

The role of the “Sign-off commit” checkbox is not to enable GPG signing but to enable the addition of the “Signed-off-by: …” line at the end of the commit message.

A.L
  • 10,259
  • 10
  • 67
  • 98