git 从抓取头/不可用的服务器中拉取
git pull from fetch head / unavailable server
在失去互联网访问权限之前,我 运行 git fetch --all
获取所有 b运行ches。
With a connection to the server now unavailable, how can I do a 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.
git pull
所做的是 fetch
后跟 merge
,因此,如果您已经执行了 fetch
,则可以执行 git merge origin/feature.a
。
由于 pull
只是一个 fetch
后跟 merge
,您应该能够 git merge origin/feature.a feature.a
并且一切顺利。
在失去互联网访问权限之前,我 运行 git fetch --all
获取所有 b运行ches。
With a connection to the server now unavailable, how can I do a
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.
git pull
所做的是 fetch
后跟 merge
,因此,如果您已经执行了 fetch
,则可以执行 git merge origin/feature.a
。
由于 pull
只是一个 fetch
后跟 merge
,您应该能够 git merge origin/feature.a feature.a
并且一切顺利。