使用 GIT 提交时我的命令行被锁定
学习 GIT。我尝试提交一组文件,下面您可以看到我到达的位置。
请求提交评论/消息,但一旦我到达此屏幕,我无法输入任何文本,我尝试的所有操作,一旦到达此屏幕,它就不会让我在窗口中输入任何文本。
我正在使用 msysGit 版本和一个名为 Console 2 的程序,该程序只是一个包含 msysGit 命令行工具的包装器
任何想法为什么它会这样做
Learning GIT. I tried committing a group of files, below you can see where I got to.
Asking for the commit comment/message but once I get to this screen, I am not able to input any text, everything I try, it will not let me enter any text into the window once it gets to this screen.
I am using the msysGit version with a program called Console 2 which is just a wrapper holding the msysGit command line tool
Any ideas why it would do this
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Git 默认使用“Vi”文本编辑器。您需要将其添加到您的 Git 配置文件中:
如果您还没有该文件,则该文件可能为空。添加此行,然后使用 Ctrl-X 保存:
Nano 是一个更容易使用的文本编辑器,可以满足您的需要。
如果您的平台上没有安装 nano(如 Windows 7 标准安装中的情况),您可以选择使用 Notepad++,或尝试 此安装程序改为使用标准记事本。
Git is using the "Vi" text editor by default. You need to add this to your Git config file:
This file may be blank if you do not have one yet. Add this line and then save using Ctrl-X:
Nano is a more straightforward to use text editor for what you want to do.
If you don't have nano installed on your platform (as is the case in standard installs of Windows 7), you can optionally use Notepad++, or try this setup program to use standard Notepad instead.
在调用 git 之前尝试将
EDITOR
设置为您习惯的内容(或使用git config
设置core.editor
)。或者学习使用vi
。或者,从命令行提供消息
Try setting
EDITOR
to something you're used to before invoking git (or usegit config
to setcore.editor
). Or learn to usevi
.Alternatively, provide message from the command line
您看到的是 git 打开 vim 供您编辑提交。
如果您更喜欢其他编辑器,您可以通过设置更改编辑器:
您在该屏幕中所需要做的就是键入提交注释并保存它,它将继续提交(无论它出现在哪个编辑器中)。
What you see is git opening
vim
for you to edit the commit.If you prefer other editor you can change the editor by setting:
All you need to do in that screen is to type a commit comment and save it, it will proceed with the commit (in whichever editor it appears).