I\'ve used git-blame to find a particular commit. Now I want to find the branch that it originally came from. (From there, I\'ll use the branch name to find the particular t
A Git branch is nothing else than a "named pointer to a commit" (that's a fundamental different concept than in other well-known VCS).
This situation is clear, commit A is on branch-1
, commit B on branch-2
:
o A [branch-1]
|
o | B [branch-2]
| |
After merging is becomes unclear whether A (or B) originally was on branch-1
or branch-2
:
o [branch-1] [branch-2]
|
o merged
|\
| o A
| |
o | B
| |
Maybe you can guess on what Git branch the commit A was if you have tagged parent commits of A, e.g. release-1
and you know that this tag only was given for commits in branch-1
.
o [branch-1] [branch-2]
|
o merged
|\
| o A
| |
o | B
| |
| o