0

我想从本地 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.
4

1 回答 1

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
于 2013-07-29T05:27:34.187 回答