我使用时出现错误
git add *
Run Code Online (Sandbox Code Playgroud)
这只是说
Killed: 9
Run Code Online (Sandbox Code Playgroud)
如果我再次输入 git add * 我得到
fatal: Unable to create
'.git/index.lock': File exists.
Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.
Run Code Online (Sandbox Code Playgroud)
如果我删除 .git/index.lock 并再次输入 git add *,我会再次收到终止错误。
我检查了 stackoverflow 上的其他答案,例如
但我不使用任何虚拟环境。
尝试使用其他答案所使用的内容:git add .而不是git add*。
这将避免 shell 解释*并将其扩展为所有非点文件。
git add .将让 git 来确定需要添加什么。