tech-repository archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: git branches (was: Re: Reply to David Holland's notes and comments)

Sorry about coming in to this discussion so late, but I hope this helps. :)

On Mon, 12 Jan 2015, David Holland wrote:

> And, as best I can tell if you create a feature branch, hack for a
> while, and then merge, there's no automated way to tell afterwards
> which of the various chains of commits were your feature commits on
> your feature branch, and which were something else. 

In git merge commits (one's which have more than one parent) the parents
are sequential and git uses this ordering.

When you merge some-thing, the first parent is the branch your on
(merging to) and the second (and so on) is the branch your merging from.

Git merge formats commit message so that if you see a message like:

	Merge branch 'new-feature'

then the first parent was the branch was master and the second was

Gitk uses the parenting order so that (in most cases) the left hand most
part of the graph is the branch your looking at, all branch to the right
are ones that have been merged to it.

> This loses information. Losing information is bad.
> Since I would like to avoid losing this information, particularly if
> converting the repository to something other than git, my questions
> are:
>    (1) Am I missing something in git's branch model? I don't think so
>        but it's always possible.

Hope the above helps. :)


Home | Main Index | Thread Index | Old Index