在失去互联网访问权限之前,我运行git fetch --all
来获取所有分支。
如果与服务器的连接现在不可用,我该如何进行
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 :(得分:4)
git pull
所做的是fetch
后跟merge
,因此,如果您已经执行fetch
,则可以执行git merge origin/feature.a
。
答案 1 :(得分:0)
由于pull
只是fetch
后跟merge
,因此您应该能够git merge origin/feature.a feature.a
并且可以继续。