Re: Recording the current branch on each commit?
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- Apr 28, 2014, 08:57 UTC
- Message-ID
- <535e1809bf54a_338911e930cb6@nysa.notmuch>
- In-Reply-To
- <CALKQrgemFx=2JaC1BaRqCwEV+knC8QftxcZ7K0AsT9azzuyVdA@mail.gmail.com>
Johan Herland wrote:
Show 9 quoted lines
> On Sun, Apr 27, 2014 at 7:38 PM, Jeremy Morton <admin@game-point.net> 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