【发布时间】:2018-06-22 02:15:56
【问题描述】:
当我使用命令行使用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
【问题讨论】:
-
取消选中“注销”复选框。这是 git 的功能,而不是 PhpStorm。
-
@sircapsalot 但是 git CLI 没有添加这一行,看起来它来自 PhpStorm。
-
git CLI,您可以使用
-s签署提交。git commit -s ...该复选框允许这样做。尝试提交,但没有选中 PhpStorm 中的“signoff commit”复选框 -
@sircapsalot 我创建了一个新的提交并且未选中“Sign-off commit”,它要求我输入密码。那么“Sign-off commit”复选框的作用就是添加这个文本?我以为它的作用是启用或禁用 GPG 签名……
-
那个复选框肯定把它放进去,是的。它主要是一个视觉指示器。它告诉任何看到它的人“这是一个正确的开源许可提交”。不要认为它与 GPG 签约有任何关系
标签: git phpstorm phpstorm2017.3