heroku 如何终止在仓库中运行的前一个git进程

mbyulnm0  于 2022-11-13  发布在  Git
关注(0)|答案(2)|浏览(107)

我把应用程序推到heroku时,终端还在运行,我不小心退出了。我以为这意味着程序结束了,所以我必须从头开始。但当我试图把应用程序上传到heroku时,它说

Another git process seems to be running in this repository, e.g.
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

我在互联网上查找,看看我如何可以停止以前的进程运行和解决方案,许多人建议是键入此代码rm -f ./.git/index.lock,但当我键入它,我得到了这个错误

Remove-Item : Parameter cannot be processed because the parameter name 'f' is ambiguous. Possible matches include: -Filter -Force.
At line:1 char:4
+ rm -f ./.git/index.lock
+    ~~
    + CategoryInfo          : InvalidArgument: (:) [Remove-Item], ParameterBindingException
    + FullyQualifiedErrorId : AmbiguousParameter,Microsoft.PowerShell.Commands.RemoveItemCommand

我该怎么办?我不想创建新的heroku应用程序,因为我已经搞砸了两次

crcmnpdw

crcmnpdw1#

尝试运行命令rmdir ./.git/index.lock -force

9avjhtql

9avjhtql2#

你得到这个是因为你的平台可能是不同的。我用的是windows,对我来说下面的命令是有效的。只要确保如果你用的是windows,那么地址中应该有反斜杠。

del "./.git/index.lock"

相关问题