On Sat, 5 Mar 2011 11:12:42 +0300
Дмитрий Волочаев <mrblack.pp...@gmail.com> wrote:

>>  ISTR, t's possible to force this via the git config mechanism.
> Thank you. I see. And then we should distinguish "mainline" commits by
> the committer name of some special string in Commit Message, right?
gitk does this: you see the committer name next to each commit.

> Is there any tool that does this while displaying the version tree,
> for example showing the mainline as a straight line or highlighting
> it?
I think you're on the wrong track here: Git does not have any notion of
mainline -- all branches are equal; the special status of a branch
usually called "master" is in the users' heads, not in Git itself.
So, no, I don't think there's any tool that somehow distinguishes
"a mainline" because there's no such thing.

On the othe hand, here's a couple of ideas which might help you achieve
your goals (which you refused to state, despite my interest).

First, you could embed your own data to commit messages on each commit,
much like git-svn does (it embeds a reference to the URL+revision pair
a particular Git commit represents).  This could be achieved by
pre-commit hooks [1] (see prepare-commit-msg hook for instance).
You could then prepare a tool which would extract such data from the
Git history (say you could write a wrapper around git-log or something
like this).

Second, there's git-notes [2] which allows to bind any sort of textual
data to commits while not modifying commites themselves.  Possibly you
could set up a way to add a note to each commit which would record the
name of the branch HEAD tracks (if any) to a note attached to such

1. http://kernel.org/pub/software/scm/git/docs/githooks.html
2. http://kernel.org/pub/software/scm/git/docs/git-notes.html

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to