本文介绍了git拉失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法执行 git pull .我正在使用 sourcetree .

I'm unable to do a git pull. I am using sourcetree.

错误消息是:

所以我试图拉了5分钟.我可以提早直到今天早上,但是现在却有了另外一种奇怪,错误的行为.

So I tried to pull for 5 minutes. I was able to pull earlier until this morning but am now getting a different, weird and incorrect behaviour.

预期的行为:

  1. 存放并拉出我的工作副本后,将其清除,直到制作下一个更改我的本地副本并保存.
  2. sourcetree 显示不再有新提交提交来挂起,直到其他开发人员提交并再次推送为止.
  1. After I stash and pull my working copy is clear till I make the nextchange on my local copy and save it.
  2. sourcetree shows no more new commits to pull pending till other developers commit and push again.

观察到的行为:

  1. 隐藏并拉动后,由于拉动而引起的所有更改都会反映为我的工作副本.因此,我一拉出 就可以得到27个文件的工作副本.没有冲突.
  2. 向我显示的是与拉动后立即挂起的提交一样多的提交.因此,如果我先拉20次提交,然后再拉,则显示从我开始拖拉的那一刻起又再次进行20次提交.
  1. After I stash and pull, all the changes due to the pull reflect as my working copy. So, I get a working copy of 27 files as soon as I pull. No conflicts.
  2. I am shown just as many commits to pull pending immediately after I pull. So if I had 20 commits to pull, and then pulled, I am being shown 20 commits to pull again from the moment I pull onwards.

拉动已完成,但未显示任何错误.我尝试了硬重置以及使用终端而不是 sourcetree 进行拉取.不好.我该如何解决?

The pull was completed without any error shown, though. I tried a hard reset as well as pulling using terminal instead of sourcetree. No good. How do I fix these?

推荐答案

这似乎是发生了,因为我在请求挂起时就进行了推送.我必须提交并推送在拉出后自动出现的工作副本,现在它可以正常工作了.

It seems this was happening because I had pushed when pulls were pending. I had to commit and push the working copy appearing automatically after the pull and it is now working fine.

这篇关于git拉失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-24 04:47