Ошибка в удалении/добавлении файла из appharbor с помощью git "Невозможно создать файл f:/git/xyz/WorkerProcess/.git/index.lock: Файл существует"
Я хочу удалить bin [или пытаться запустить $ git добавить.] из локальной папки git, а также в папку с размещенной папкой приложения, но я не могу удалить папку и получить следующую ошибку
$ 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.
Ответы
Ответ 1
Это работает для меня:
$ git clean -f .git/index.lock
Removing .git/index.lock
[email protected] /f/git/xyz/WorkerProcess (master)
$ git init
Reinitialized existing Git repository in f:/git/xyz/WorkerProcess/.git/
[email protected] /f/git/xyz/WorkerProcess (master)
$ git add .
[email protected] /f/git/xyz/WorkerProcess (master)
$ git rm bin
fatal: not removing 'bin' recursively without -r
[email protected] /f/git/xyz/WorkerProcess (master)
$ git rm -r -f bin