【发布时间】:2012-01-02 04:38:54
【问题描述】:
我是git 的新手,并试图提交,但我陷入了我不熟悉的vi。我设法摆脱了它,但我认为我走错了路,因为我的 git 状态显示“未上演更改”,但我仍然无法再试一次。有人能告诉我我可以做些什么来修复仍然挂起的进程并提交我的更改吗?
这是错误
fatal: Unable to create '/.git/index.lock': File exists.
If no other git process is currently running, this probably means a
git process crashed in this repository earlier. Make sure no other git
process is running and remove the file manually to continue.
不是我取出完整路径
一如既往地感谢您的帮助。
【问题讨论】:
-
查看
git status的完整结果会很有帮助。 -
请注意,您可以通过
git config --global core.editor EDITOR_NAME更改用于提交消息的编辑器,其中EDITOR_NAME是您路径(或完整路径)中的可执行文件。 -
您可能希望看到这个关于如何更改 git 中的默认编辑器的问题:stackoverflow.com/questions/10564/…
-
rm -f ./.git/index.lock 这对我有用,stackoverflow.com/questions/7860751/…
-
@RAJCHOW 也对我有用。我会用 CTR+Z“停止”另一个 git add -a 进程
标签: git