From: Felipe Contreras Date: Mon, 28 Apr 2014 08:57:45 GMT Subject: Re: Recording the current branch on each commit? Message-ID: <535e1809bf54a_338911e930cb6@nysa.notmuch> In-Reply-To: Johan Herland wrote: > On Sun, Apr 27, 2014 at 7:38 PM, Jeremy Morton wrote: > > Whatsmore, tracking down which branch a commit pertains to is still rather > > difficult using this approach. You can go back through the history and > > find "Merge branch 'pacman-minigame'", but how do you know which commit was > > the *start* of that branch, if they are not tagged with the branch name? > > Once you have found the merge commit (M), git log M^1..M^2 should list > all the commits that were made on that branch. The parent of the last > in that list can be considered the starting point for the branch. It's not that easy. There has been a lot of discussion in the mailing list and StackOverflow of ways to do this [1]. The conclusion, at least for me, is that there's no way to find that out, so it has to be recorded. [1] http://thread.gmane.org/gmane.comp.version-control.git/198587 -- Felipe Contreras