我刚接触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
结果会很有帮助。 - jdlgit config --global core.editor EDITOR_NAME
命令更改用于提交消息的编辑器,其中EDITOR_NAME
是您路径中的可执行文件(或完整路径)。 - Michael Mior