2011-05-10 50 views
1

在我們的項目中,我們使用GIT來管理我們的代碼庫。我們有一箇中央在線存儲庫,所有開發人員都在這個存儲庫中進行推送。GIT:在第一次試驗中一直拉不通,並在第二次試驗中工作

在windows上運行git with tortoise 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) 
+0

這是否發生在第一次拉動時,例如在您首次創建本地回購時?通常情況下,第一次創建本地副本時會克隆遠程存儲庫。 – 2011-05-11 00:23:27

回答

0

你得到同樣的問題,僅拉出主?正如...

git checkout master 
git pull origin master 

此外,您可能希望從錯誤消息中取出域名和回購名稱,以免人們嘗試克隆項目。

0

不要使用龜git。卸載或禁用git git並從命令行嘗試。這與Windows外殼有關。

讓我知道你是否可以在Git Bash中重現問題。

乾杯

相關問題