When I type in git commit into the terminal I don't get sent to a text editor. What is wrong?

huangapple go评论79阅读模式
英文:

When I type in git commit into the terminal I don't get sent to a text editor. What is wrong?

问题

我理解,通常如果您想要更改提交评论的名称,只需在终端中键入git commit,然后文本编辑器会自动弹出。

文本编辑器可能是以下之一:

GIT_EDITOR环境变量
core.editor配置设置
VISUAL环境变量
EDITOR环境变量

我需要下载其中一个文本编辑器吗?

英文:

As I understand it, normally if you want to change the name of a comment on a commit you would simply type in git commit into the terminal and a text editor would automatically pop up.

The text editors might be one of the following:

GIT_EDITOR environment variable
core.editor configuration setting
VISUAL environment variable
EDITOR environment variable

Do I need to download one of these text editors?

答案1

得分: 0

> 据我了解,通常如果您想更改提交上评论的名称,只需在终端中键入git commit,然后文本编辑器会自动弹出。

这是正确的。但通常默认的文本编辑器是Vim

如果您想设置,例如,Notepad++。

git config --global core.editor "'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"

当然,请设置您的编辑器的位置。

英文:

> As I understand it, normally if you want to change the name of a
> comment on a commit you would simply type in git commit into the
> terminal and a text editor would automatically pop up.

Well that is true. But usually default text editor is Vim.

If you want to set, for example , Notepad ++.

git config --global core.editor "'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"

Of course set the location of your editor.

huangapple
  • 本文由 发表于 2020年1月6日 22:34:12
  • 转载请务必保留本文链接:https://go.coder-hub.com/59613901.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定