当我从 git bash 执行 git pull
时,终端通常会运行 pull,更新我的本地,然后挂起。我不确定它是否在等我做某事,但我通常使用 CTRL-C
退出。在那之后,我得到一个 index.lock 阻止我做其他我必须删除它的事情。我是否误解了 git pull
的工作原理?
最佳答案
您可能需要删除不必要的 git 对象,例如悬挂提交和 blob
:
git fsck && git gc --prune=now
git-fsck : Verifies the connectivity and validity of the objects in the database
git-gc : Cleanup unnecessary files and optimize the local repository
您可以 refer here关于悬挂提交和 blob
。
关于git - 为什么 git pull 会挂起?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44031150/