使用core.editor的git commit命令等于atom [英] git commit command with core.editor equals atom

查看:188
本文介绍了使用core.editor的git commit命令等于atom的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

原子编辑器有问题。我通过命令将atom设置为core.editor:

  git config --global core.editor atom 

code>

但是,当我尝试通过

  git commit 

命令,我希望编辑我的选择将打开并提示输入提示信息,但在它打开之前,git会抛出一个错误。

 由于空提交消息而中止提交。 

在它打开编辑器之后,当我输入提交消息并退出编辑器时,我知道我可以使用命令

  git commit -m'< message>'

但是我想知道为什么会出现这个错误以及如何解决它。

解决方案

使用:

  git config --global core.editoratom --wait 

原子 - 等待标志在返回之前等待窗口关闭。


I have a problem with atom editor. I set atom as the core.editor by command:

git config --global core.editor atom

But when I try to commit the changes to a repository in git by

git commit

command, I expects that the editor of my choice will open and prompt for the commit message but before it opens git throws an error

Aborting commit due to empty commit message.

after it it opens the editor and when I enter the commit message and quits the editor no commit occurs, I know I can use command

git commit -m '<message>'

but I want to know why this error occurs and how to solve it.

解决方案

try with:

git config --global core.editor "atom --wait"

the atom --wait flag wait for window to be closed before returning.

这篇关于使用core.editor的git commit命令等于atom的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆