简体   繁体   English

我执行git commit时编辑器出现问题

[英]Problems with Editor when i do git commit

In my message for commit, I'm trying to use the guidelines: 在我的提交消息中,我正在尝试使用指南:

1º Line - summary with <80char 1º线 - 总结<80char

2º Line - space 2º线 - 空间

3º Line - The body message start here 3º线 - 身体信息从这里开始

In console, I'm doing this: 在控制台中,我这样做:

git commit git commit

then the editor opens and i write my message that i want to following the guidelines I save and then close the editor. 然后编辑器打开,我写了一条消息,我想遵循我保存的指导方针,然后关闭编辑器。

i return the console and it give me the error: 我返回控制台,它给我错误:

error: There was a problem with the editor '"C:/Program Files (x86)/GitExtensions/GitExtensions.exe" fileeditor'.

Please supply the message using either -m or -F option.

From what you are saying i can assume that you are using git extension on windows, i think that your issue is related to a bad configuration, configure the default text editor in the configuration pane of git extension . 从你的说法我可以假设你在Windows上使用git扩展,我认为你的问题与错误的配置有关,在git扩展的配置窗格中配置默认​​文本编辑器。

Otherwise you can commit without having the editor prompted each time in this way : 否则,您可以在不通过这种方式每次提示编辑器的情况下提交:

git commit -m "Your commit message"

If you want to have a multiline message you can break the line with a backslash : 如果你想要一个多行消息,你可以用反斜杠打破这一行:

git commit -m "1º Line - summary with <80char \
2º Line - space \
3º Line - The body message start here"

I suspect this is because your text editor does not exit with status code 0 (indicating success, and no error). 我怀疑这是因为你的文本编辑器没有退出状态代码0(表示成功,没有错误)。 What text editor are you using and did you quit the text editor cleanly? 你正在使用什么文本编辑器,你干净地退出了文本编辑器?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 Windows 10 cmd 中由“git commit --amend”打开的这个编辑器是什么,我该如何使用它? - What is this editor opened by "git commit --amend" in Windows 10 cmd and how do I use it? git 与 emacs 一起作为编辑在 Windows 下提交 - git commit with emacs as editor under Windows 从bash命令提示符运行时,为什么GIT不使用core.editor和commit.template配置值? - Why does GIT not use the core.editor and commit.template configuration values when running from the bash command prompt? git review -s安装commit-msg钩时遇到问题 - git review -s Problems encountered installing commit-msg hook 无法在Windows / PHP上执行Git提交 - Cannot do Git Commit on Windows / PHP 如何在 Powershell 和 nano 下保存 git commit 消息? (Ctrl+O 不起作用) - How do I save git commit message under Powershell and nano ? (Ctrl+O doesn't work) 使用批处理文件提交到GIT存储库时,如何提示用户发表评论? - How can I prompt a user for a comment when using a batch file to commit to a GIT repository? 如何使git在Windows上使用我选择的编辑器而不是Notepad.exe? - How do I make git use the editor of my choice on Windows instead of Notepad.exe? 在 Windows 上签署 git 提交时出现“无密钥”错误 - "No secret key" error when signing git commit on Windows 如何按日期获取下一个 Git 提交? - How can I get next Git commit by date?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM