我想从本地git hub文件夹以及托管的app-harbor文件夹中删除bin [或尝试运行$ git add。],但我无法删除文件夹并收到以下错误
$ git rm -r bin [ $ git rm -f bin]
fatal: Unable to create 'f:/git/xyz/WorkerProcess/.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.
答案 0 :(得分:0)
它对我有用:
$ git clean -f .git/index.lock
Removing .git/index.lock
comp1@SHAILESH01 /f/git/xyz/WorkerProcess (master)
$ git init
Reinitialized existing Git repository in f:/git/xyz/WorkerProcess/.git/
comp1@SHAILESH01 /f/git/xyz/WorkerProcess (master)
$ git add .
comp1@SHAILESH01 /f/git/xyz/WorkerProcess (master)
$ git rm bin
fatal: not removing 'bin' recursively without -r
comp1@SHAILESH01 /f/git/xyz/WorkerProcess (master)
$ git rm -r -f bin