On Wednesday, July 22, 2015 at 4:03:46 PM UTC+5:30, Konstantin Khomoutov 
> On Tue, 21 Jul 2015 23:00:23 -0700 (PDT) 
> dexter ietf <dexte...@gmail.com <javascript:>> wrote: 
> I'm afraid you might have terminological issues here: you can't clone 
> branches, you can only clone entire repositories (containing branches). 
> As to whether a branch might track any other *arbitrary* branch -- the 
> answer is yes.  Git, on purpose, pays absolutely no attention to the 
> source of the information it manages: the only think it's concerned 
> with is object names (those string representations of SHA-1 hash 
> values).  So you might obtain a branch X from a repository A, fork a 
> local branch L off it and then set your L to track arbitrary branch Y 
> fetched from a repository B.  X and Y might be the same (in terms of 
> their history) or may be completely different -- Git does not care; 
> just in the latter case `git status` et al will tell you your L and Y 
> are heavily diverged because they contain unrelated disjoint histories. 
> To understand how Git "knows" whether two branches are related in terms 
> of their histories, and how much they are diverged is easy: to get this 
> information Git uses the same technique as the `git merge-base` command 
> does, so consider reading its manual page. 
> As to "tracking" a branch by another branch, this information is purely 
> declarative and amounts to a single entry in the .git/config file, 
> which you will easily be able to locate. 

Hi Konstantin,

you are right, i got mixed up with the terms. your answer made this clear.
thanks a lot for the info.


You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to