----- Original Message ----- 
  From: Alex Rodrigues 
  To: git-users@googlegroups.com 
  Sent: Saturday, March 29, 2014 3:22 AM
  Subject: [git-users] How do I find the branch of each parent of a merge 
commit?


  I would like to find the branches that contributed to a commit that was the 
result of a merge. If I am able to find the SHASUM of each of the versions that 
contributed to the merge (i.e. the parents), how can I get the branch of each 
of the parents? Note that the merge could have been done from the branch or 
from a tag on the branch.
Branch names are generally ephemeral (i.e. temporary) so it is not possible in 
an absolute sense to determine which branch name a merge came from - the name 
can be deleted after a merge.

a normal merge commit does record what was merged as text, so you can read that 
if it hasn't been modified.

Also the merge does record the sha1's of both it's parents (or multi-parents!) 
as part of the DAG (directed acyclic graph ~ linked list) so you can see the 
sha1 of the second parent and follow that line of commits if you want to see 
the actual content and who made those mergexd commits (which is more reliable 
for allocating 'Blame'!)

Philip.

-- 
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