Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git 防止PhpStorm添加“;签字人:…”;在提交消息的末尾_Git_Phpstorm_Phpstorm2017.3 - Fatal编程技术网

Git 防止PhpStorm添加“;签字人:…”;在提交消息的末尾

Git 防止PhpStorm添加“;签字人:…”;在提交消息的末尾,git,phpstorm,phpstorm2017.3,Git,Phpstorm,Phpstorm2017.3,当我使用命令行使用git创建提交时,不会更改提交消息 当我在选中“注销提交”复选框的情况下通过PhpStorm的GUI创建提交时,PhpStorm会在提交消息的末尾添加以下行: Signed-off-by: Firstname Lastname <me@example.com> 必须取消选中“注销提交”复选框,以便不会向提交消息中添加任何内容 “Sign off commit”复选框的作用不是启用GPG签名,而是启用在提交消息末尾添加“Signed off by:…”行。该“Sig

当我使用命令行使用
git
创建提交时,不会更改提交消息

当我在选中“注销提交”复选框的情况下通过PhpStorm的GUI创建提交时,PhpStorm会在提交消息的末尾添加以下行:

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

必须取消选中“注销提交”复选框,以便不会向提交消息中添加任何内容

“Sign off commit”复选框的作用不是启用GPG签名,而是启用在提交消息末尾添加“Signed off by:…”行。

该“Signed off by”消息实际上来自Git,而不是PhpStorm

您可以通过取消选中“注销提交”复选框来禁用此注销消息

摘自关于签署承诺的内容

在提交日志消息的末尾添加提交人签署的行。 签准的含义取决于项目,但它通常证明提交人有权在同一许可证下提交该作品,并同意开发商的原产地证书(有关更多信息,请参阅)


仅供参考,这不应与“签署”承诺相混淆。签名提交与GPG密钥有关,而“注销”仅与作为提交后缀的任意消息有关。

取消选中“注销”复选框。这是git的一项功能,不是PhpStorm。@sircapsalot但git CLI没有添加这一行,它似乎来自PhpStorm。在git CLI中,您可以使用
-s
注销提交
git commit-s…
该复选框允许这样做。尝试提交,但不要在PhpStorm中选中“signoff commit”复选框checked@sircapsalot我创建了一个新的提交,未选中“注销提交”,它要求输入我的密码短语。“签准提交”复选框的作用是添加此文本?我认为它的作用是启用或禁用GPG签名…那个复选框肯定会把它放进去,是的。它主要是一个视觉指示器。。它告诉任何看它的人“这是一个正确的开源许可提交”,不要认为这与GPG签名有任何关系
$ 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