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

How do I get the name of the parent branch?

From
Bruce Korb <bruce.korb@gmail.com>
Date
Jul 3, 2011, 16:49 UTC
Message-ID
<4E109D8F.3030402@gmail.com>

Google results point to how to get to commits that have gone into parent branches, but fundamentally I just want to have a script that constructs a diff of what has changed since the latest branch without having to do manual research to figure out the name.

As best as I can tell, you use:
    git format-patch -o pdir --ignore-if-in-upstream $branch

the hard part seems to be (but ought not be) figuring out the value for "$branch".

Next: Jay Soffian
Message 1 of 2 in “How do I get the name of the parent branch?”
  1. Bruce KorbJul 3, 2011
  2. Jay SoffianJul 3, 2011

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.