On Thu, Mar 21, 2013 at 12:48:59PM -0700, Brian Jones wrote:
> In out of the box git, do commits remember the name of the branch that
> created them? If so, what command can I use to see that information? My
> assumption is that commits do not record branch names but I want
They do not.
Remember that Git was concieved with the Linux kernel in mind, and its
development uses a hierarchical approach where patches flow through many
staging trees so that names of actual branches in each of them have no
sense at all to the final result (look at the tree picture at  to get
better idea of that).
For small projects, the idea of keeping track of the originating branch
is not really so absurd, so some sort of a policy might be used for
this. For instance, a prefix codifying a feature being developed might
be inserted in commit messages' headers. Or a prepare-commit-msg hook
might be used to automatically insert some custom field in commit
Another approach (described in , for instance) is to never use
fast-forward merges of feature branches back into their originating
branches, and describe the feature in the integration merge commit.
This is not a solution to the problem as stated, but if you just want
better understanding of the project's history, this might be the way to
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
For more options, visit https://groups.google.com/groups/opt_out.