我一直在使用工作计算机上的git bash开发分支中的项目。我刚试图结账到主分支,因为我打算合并这些更改,但是当我尝试执行此操作时,命令行无限期地挂起,直到我用CTRL + C将其终止。Git Checkout无限期地挂着git bash。怎么解决?
如果我尝试再次结帐,我得到以下错误:
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.
但是,删除index.lock文件,试图再次简单地挂在终端和从未使用git结帐后,使任何进展,直到我再次杀掉该进程!等等。!
有没有人遇到过这个问题,如果是的话,你是怎么解决这个问题的?
你可以试着用'GIT_TRACE = 1'在你的命令前面,并报告卡在哪里? –
我得到的输出是'15:11:16.365303 git.c:371 trace:built-in:git'checkout''master'' – jamessct
如果你运行'git worktree add'并将另一个文件夹作为结帐目的地?也许Git正在等待其他进程去除文件上的锁定。 –