[英]How can I pull another repository and update to its head in GIT?
Here is the description of the problem in terms of Mercurial: 以下是关于Mercurial的问题描述:
Given: 鉴于:
Needed: 需要:
This is what I want to do in term of Mercurial: 这就是我要用Mercurial要做的事情:
A> hg pull B
A> hg heads # Notice the most recent head of B
A> hg update **REV**
How can I do it in GIT? 我该如何在GIT中做到这一点? More concretely:
更具体地说:
I know it should be trivial, still I cannot figure it out. 我知道这应该是微不足道的,但我仍然无法弄清楚。
Anyone? 任何人?
git remote add other_repo
git fetch
git merge other_repo/branch
git remote add a_repo a_repo_url
git fetch a_repo
git merge a_repo/branch
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.