防止 PhpStorm 在提交消息末尾添加“Signed-off-by: ...”
Prevent PhpStorm from adding “Signed-off-by: …” at the end of commit message
当我使用命令行 git
创建提交时,提交消息没有改变。
当我通过 PhpStorm 的 GUI 创建提交并选中“Sign-off commit”复选框时,PhpStorm 在我的提交消息末尾添加了这一行:
Signed-off-by: Firstname Lastname <me@example.com>
如何预防?我不希望 PhpStorm 在每次提交结束时都写上“Signed-off-by: ...”。
这是我的 git 配置:
$ 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
必须取消选中“Sign-off commit”复选框,以便不会向提交消息中添加任何内容。
“Sign-off commit”复选框的作用不是启用 GPG 签名,而是启用在提交消息末尾添加“Signed-off-by: …”行。
"Signed-off-by" 消息实际上来自 Git,而不是 PhpStorm。
您可以通过取消选中 "Sign-off commit" 复选框来禁用此签发消息。
摘自 this answer 关于签署提交的内容。
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).
仅供参考,这不应与 "Signing" 提交混淆。签名提交与 GPG 密钥有关,而 "signing-off" 仅与提交后缀的任意消息有关。
当我使用命令行 git
创建提交时,提交消息没有改变。
当我通过 PhpStorm 的 GUI 创建提交并选中“Sign-off commit”复选框时,PhpStorm 在我的提交消息末尾添加了这一行:
Signed-off-by: Firstname Lastname <me@example.com>
如何预防?我不希望 PhpStorm 在每次提交结束时都写上“Signed-off-by: ...”。
这是我的 git 配置:
$ 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
必须取消选中“Sign-off commit”复选框,以便不会向提交消息中添加任何内容。
“Sign-off commit”复选框的作用不是启用 GPG 签名,而是启用在提交消息末尾添加“Signed-off-by: …”行。
"Signed-off-by" 消息实际上来自 Git,而不是 PhpStorm。
您可以通过取消选中 "Sign-off commit" 复选框来禁用此签发消息。
摘自 this answer 关于签署提交的内容。
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).
仅供参考,这不应与 "Signing" 提交混淆。签名提交与 GPG 密钥有关,而 "signing-off" 仅与提交后缀的任意消息有关。