git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

Previous: bd@bc-bd.orgNext: Miklos Vajna
Message 2 of 10 in “How do I show only log messages for commits on a specific branch?”
  1. bd@bc-bd.orgDec 16, 2009
  2. Elijah NewrenDec 16, 2009
  3. Miklos VajnaDec 16, 2009
  4. Santi BéjarDec 16, 2009
  5. Elijah NewrenDec 17, 2009
  6. Elijah NewrenDec 16, 2009
  7. Miklos VajnaDec 17, 2009
  8. Stefan VölkelDec 17, 2009
  9. David RodenDec 17, 2009
  10. Pat NotzDec 17, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.