2017-02-15 38 views
0

在丟失互聯網訪問之前,我跑git fetch --all來提取所有分支。從提取頭/不可用服務器的git pull

由於現在不能連接到服務器,我該怎麼辦git pull

$ git checkout feature.a 
Already on 'feature.a' 
Your branch is behind 'origin/feature.a' by 7 commits, and can be fast-forwarded. 
    (use "git pull" to update your local branch) 

$ git pull 
ssh: Could not resolve hostname unavailable.example.com: nodename nor servname provided, or not known 
fatal: Could not read from remote repository. 

Please make sure you have the correct access rights 
and the repository exists. 
+0

'pull'只是'fetch'後面是'merge'。所以你現在需要做的是'git merge origin/branch mybranch'? – castis

+0

完美運作。我真的沒有意識到pull執行了合併,而且我通過'origin/x'去了那個point_的原點。呵呵。這使得現在有了很好的意義。如果你想添加這個答案,我會接受。我在其他帖子之前讀過這個帖子.. –

+0

好的,會做。 – castis

回答

3

git pull做什麼是fetch後跟一個merge,所以,如果你已經做了fetch,你可以做git merge origin/feature.a

0

由於pull只是一個fetch其次merge,你應該能夠git merge origin/feature.a feature.a,並很好去。

相關問題