开发者

GIT: pulling alway fails on the first trial and works on the second

In our project we use GIT to manage our code base. We have one central online repository, against which all developers push and pull.

Running git with tortoise git on windows, I'm having the following strange issue: When pulling, the first attempt to pull always fails (with the error message pasted below), and a subsequent attempt always succeed. Nothing changed in between.

I'm using git with very shallow understanding of its principles, only what I have to know for the basic use cycle. Help me please to solve this riddle

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 343989a102开发者_如何学JAVA53c1545537e963e70fc21f95f64d20
 ! 343989a..ac6cb05  master     -> origin/master  (unable to update local ref)


Do you get the same problem if you checkout master and pull only master? As in...

git checkout master
git pull origin master

Also, you might want to take the domain and repo name out of your error message, so people don't go trying to clone your project.


Don't use tortoise git. Uninstall or disable tortoise git and try from the command line. This has something to do with the windows shell.

Let me know if you can reproduce the problem in Git Bash.

Cheers

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜