我是新手,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.
Run Code Online (Sandbox Code Playgroud)
不是我走完全路
一如既往地感谢您的帮助.
Suh*_*Taj 13
从.git目录手动删除index.lock文件.
要么
从命令行:
$ rm -rf .git/index.lock
Run Code Online (Sandbox Code Playgroud)
注意:确保.git目录中只存在一个索引文件
Pla*_*ure 11
假设你现在没有用git做任何事情(也就是说,出于任何原因没有在存储库中执行推送或拉动或运行git脚本),你可以手动删除锁定文件并再试一次.
此外,git需要一个描述您的更改的"提交消息".假设您不想打开编辑器,可以使用以下-m选项提供内联消息:
git commit -am "Changed this, that, and the other thing"
Run Code Online (Sandbox Code Playgroud)