GIT:在第一次试验中拉扯失败并在第二次试验中继续工作

时间:2011-05-10 22:46:49

标签: git

在我们的项目中,我们使用GIT来管理我们的代码库。我们有一个中央在线存储库,所有开发人员都可以根据这些存储库推送和拉动。

在Windows上运行带有togise git的git,我遇到了以下奇怪的问题: 拉动时,第一次拉动尝试总是失败(下面粘贴错误信息),后续尝试总是成功。两者之间没有任何变化。

我正在使用git,对其原理的理解非常浅,只有我必须知道的基本使用周期。 请帮我解决这个谜语

git.exe pull -v --progress  "origin" 
remote: Compressing objects:  10% (40/393)   /393)   /393)   /393)   /393)   /393)   /393)   /393)   393)   393)   remote: Compressing objects:  21% (83/393)   /393)   /393)   /393)   /393)   /393)   /393)   /393)   /393)   /393)   remote: Compressing objects:  31% (122/393)   8/393)   4/393)   1/393)   7/393)   3/393)   /393)   /393)   /393)   remote: Compressing objects:  41% (162/393)   8/393)   4/393)   0/393)   6/393)   2/393)   8/393)   4/393)   0/393)   remote: Compressing objects:  51% (201/393)   7/393)   3/393)   9/393)   5/393)   1/393)   7/393)   3/393)   9/393)   remote: Compressing objects:  61% (240/393)   6/393)   2/393)   8/393)   5/393)   1/393)   7/393)   3/393)   9/393)   remote: Compressing objects:  71% (280/393)   6/393)   2/393)   8/393)   4/393)   0/393)   6/393)   2/393)   8/393)   remote: Compressing objects:  81% (319/393)   5/393)   1/393)   7/393)   3/393)   9/393)   5/393)   1/393)   7/393)   remote: Compressing objects:  91% (358/393)   4/393)   0/393)   6/393)   2/393)   8/393)   5/393)   1/393)   7/393)   remote: Compressing objects: 100% (393/393), done.3/393)   0/393)   6/393)   2/393)   8/393)   4/393)   0/393)   Receiving objects:  22% (91/412), 36.00 KiB | Receiving objects:  24% (99/412), 36.00 KiB | 32 KiB/s   00 KiB | 32 KiB/s    | 32 KiB/s   00 KiB | 32 KiB/s   00 KiB | Receiving objects:  29% (120/412), 36.00 KiB | 32 KiB/s   .00 KiB | 32 KiB/s   .00 KiB | 32 KiB/s   .00 KiB | 32 KiB/s   Receiving objects:  33% (139/412), 52.00 KiB | 22 KiB/s   .00 KiB | 32 KiB/s   .00 KiB | 32 KiB/s   .00 KiB | 32 KiB/s   Receiving objects:  38% (157/412), 52.00 KiB | 22 KiB/s   .00 KiB | 22 KiB/s   .00 KiB | 22 KiB/s   .00 KiB | 22 KiB/s   Receiving objects:  43% (178/412), 52.00 KiB | 22 KiB/s   .00 KiB | 22 KiB/s   .00 KiB | 22 KiB/s   .00 KiB | 22 KiB/s   Receiving objects:  48% (198/412), 52.00 KiB | 22 KiB/s   .00 KiB | 22 KiB/s   .00 KiB | 22 KiB/s   .00 KiB | 22 KiB/s   Receiving objects:  53% (219/412), 52.00 KiB | 22 KiB/s   .00 KiB | 22 KiB/s   .00 KiB | 22 KiB/s   .00 KiB | 22 KiB/s   Receiving objects:  58% (239/412), 52.00 KiB | 22 KiB/s   .00 KiB | 22 KiB/s   .00 KiB | 22 KiB/s   .00 KiB | 22 KiB/s   Receiving objects:  62% (257/412), 68.00 KiB | 20 KiB/s   .00 KiB | 22 KiB/s   .00 KiB | 22 KiB/s   .00 KiB | 22 KiB/s   Receiving objects:  67% (277/412), 68.00 KiB | 20 KiB/s   .00 KiB | 20 KiB/s   .00 KiB | 20 KiB/s   .00 KiB | 20 KiB/s   Receiving objects:  72% (297/412), 68.00 KiB | 20 KiB/s   .00 KiB | 20 KiB/s   .00 KiB | 20 KiB/s   .00 KiB | 20 KiB/s   Receiving objects:  77% (318/412), 68.00 KiB | 20 KiB/s   .00 KiB | 20 KiB/s   .00 KiB | 20 KiB/s   .00 KiB | 20 KiB/s   Receiving objects:  82% (338/412), 68.00 KiB | 20 KiB/s   .00 KiB | 20 KiB/s   .00 KiB | 20 KiB/s   .00 KiB | 20 KiB/s   Receiving objects:  87% (359/412), 68.00 KiB | 20 KiB/s   .00 KiB | 20 KiB/s   .00 KiB | 20 KiB/s   .00 KiB | 20 KiB/s   Receiving objects:  92% (380/412), 68.00 KiB | 20 KiB/s   .00 KiB | 20 KiB/s   .00 KiB | 20 KiB/s   .00 KiB | 20 KiB/s   Receiving objects:  97% (400/412), 68.00 KiB | 20 KiB/s   .00 KiB | 20 KiB/s   .00 KiB | 20 KiB/s   .00 KiB | 20 KiB/s   Receiving objects: 100% (412/412), 68.00 KiB | 20 KiB/s   .00 KiB | 20 KiB/s   .00 KiB | 20 KiB/s   
Resolving deltas: 100% (270/270)   
remote: Total 412 (delta 270), reused 0 (delta 0)pleted with 87 local objects.
From [name of our server here]:/[name of environment]
 + 343989a...a2571e8 HEAD       -> origin/HEAD  (forced update)
error: Ref refs/remotes/origin/master is at a2571e891886db718e991a06f9c2672882492c83 but expected 343989a10253c1545537e963e70fc21f95f64d20
 ! 343989a..ac6cb05  master     -> origin/master  (unable to update local ref)

2 个答案:

答案 0 :(得分:0)

如果你结账主人并且只拉主人,你会遇到同样的问题吗?如... ...

git checkout master
git pull origin master

此外,您可能希望从错误消息中获取域名和回购名称,因此人们不会尝试克隆您的项目。

答案 1 :(得分:0)

不要使用乌龟git。卸载或禁用tortoise git并从命令行尝试。这与windows shell有关。

如果你能在Git Bash中重现这个问题,请告诉我。

干杯