On Fri, 27 Dec 2013 06:03:31 -0800 (PST) "Jagadeesh N. Malakannavar" <[email protected]> wrote:
> Hello, I have branch structres something like this > > > / > / rel-1 > ------------------/--------------------/- <top of tree > / > / < rel-2 > > > I have made some commits on rel-1. After some months I branched out > rel-2. How do I make sure that commits I made on rel-1 is in rel-2? > Just want to list out all missing commits on rel-2. That's a philosophical question rather than technical. You used the word "branched", and this means all the commits reachable from the head "rel-1" are also reachable from the head "rel-2". This means a simple (technical) answer to your question is "yes, rel-2 contains all commits from rel-1, by definition". If you implied, without spelling that, that rel-1 *moved* since the point both branches diverged, then the answer is "use git-log": The call git log rel-1 ^rel-2 or, spelling the same the other way, git log rel-2..rel-1 would show the commits reachable from rel-1 but not reachable from rel-2. (To get better grasp on the idea of this read the section "SPECIFYING RANGES" in the git-rev-parse manual page.) Note that using this approach implies that rel-1 is periodically re-merged (re-integrated) to rel-2 (or back). If you, instead, just cherry-picked a random commits from rel-1 to rel-2, they won't be noticed by the `git log` (and `git merge-base`, which it uses) machinery as it's only concerned with graphs of commits, and cherry-picked commits do not contain any meta information about where they came from, and do not mean joining of histories anyway. -- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
