git - 为什么 git pull 会挂起?

标签 git git-bash git-pull

当我从 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/

相关文章:

git - 当不可能进行快进 merge 时,如何防止 merge 回退到正常的 merge 策略?

git - 如何在github中从上游 pull pull 请求

git - 验证数据无效。连接被拒绝。 android studio 无法登录github

git - 如果我重命名它,如何访问我的 bitbucket 存储库

Git - 部分解决冲突并将更改发送给其他人以完成解决

github - 更新 fork 的 GitHub 存储库以匹配原始的最新代码和提交

python - 在 Anaconda 中安装 Python 模块开发版本的最佳实践是什么?

windows - Git Bash 无法解析 %userprofile%

linux - “vagrant up”在 Windows 上不起作用

git - 从错误的提交消息中恢复 [Windows 上的 git bash]?