How can I pull another repository and update to its head in GIT?
Posted
by
mark
on Stack Overflow
See other posts from Stack Overflow
or by mark
Published on 2012-10-31T16:57:38Z
Indexed on
2012/10/31
17:00 UTC
Read the original article
Hit count: 152
git
Here is the description of the problem in terms of Mercurial:
Given:
- Two repos A and B, where B is a fork of A
- The current directory is a working directory for the tip of A.
Needed:
- Pull in B and update to its most recent head REV.
This is what I want to do in term of 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? More concretely:
- A is the master branch of https://github.com/yui/yui3-gallery.git
- B is the master branch of https://github.com/jafl/yui3-gallery.git
- I need to update to the most recent revision of B, when I have a local clone of A
I know it should be trivial, still I cannot figure it out.
Anyone?
© Stack Overflow or respective owner