Git提交消息问题

Jon*_*han 4 git

当我使用 apt 存储库中的 Git 2.7.4 在 16.04 上发出以下命令时

git commit -sS --status
Run Code Online (Sandbox Code Playgroud)

我得到以下结果:

Aborting commit due to empty commit message.
Run Code Online (Sandbox Code Playgroud)

我已经配置了 Git 全局配置如下:

jonathan@Aristotle:~/EclipseWorkspaces/AGI$ git config --global -l
user.name=Jonathan Gossage
user.email=jgossage@gmail.com
core.editor=gedit
Run Code Online (Sandbox Code Playgroud)

鉴于此配置,我希望 Git 启动 gedit 编辑器以允许我输入提交消息。这是对空存储库的第一次提交。git status 作为附件包含在内。

tec*_*raf 5

使用-w选项配置您的编辑器,还添加-sgedit在每次调用时运行一个新实例:

git config --global core.editor "gedit -w -s"
Run Code Online (Sandbox Code Playgroud)

或者(由于 中的这个错误gedit)使用带有长参数的调用:

git config --global core.editor "gedit --wait --new-window"
Run Code Online (Sandbox Code Playgroud)