Re: How do I show only log messages for commits on a specific branch?
- From
Elijah Newren <newren@gmail.com>
- Date
- Dec 16, 2009, 18:05 UTC
- Message-ID
- <51419b2c0912161005n1596d4a1n92ed555c98aee4c6@mail.gmail.com>
- In-Reply-To
- <20091216101647.GB27373@bc-bd.org>
On Wed, Dec 16, 2009 at 3:16 AM, <bd@bc-bd.org> wrote:
Show 18 quoted lines
> imagine this: > > --A--*--B (new) > / > *--X--*--Y (master) > > Now I'd like to list only log messages for A..B (X..B would be okay too). > > I know of > > git log master..new > > however then I need to remember that I branched new of master, and to be honest, > sometimes I forget. > > So how do I: > > git please-tell-me-the-branch-I-started-this-branch-from new
In the above example, you technically did not create 'new' off of
'master', you created new starting at X. You may think of it in terms
of branching off of 'master', but
git branch new master
resolves 'master' to the commit it points at and creates 'new'
pointing at that commit. That's all that is recorded. But I believe
the info you are really interested in is where new started, rather
than the fact that it branched off master. Is that correct? If so,
just use new@{30.years.ago} (or any other sufficiently long period of
time):
git log new@{30.years.ago}..new
(You'll get a warning that 'new' hasn't existed for 30 years but it
doesn't hurt anything)Hope that helps, Elijah