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

Re: finding unmerged branches

From
Avery Pennarun <apenwarr@gmail.com>
Date
Aug 27, 2009, 22:22 UTC
Message-ID
<32541b130908271522u1048dcb1h67b79049e46df1ac@mail.gmail.com>
In-Reply-To
<20090827220241.GA1413@gnu.kitenet.net>
On Thu, Aug 27, 2009 at 10:02 PM, Joey Hess<joey@kitenet.net> wrote:
Show 6 quoted lines
> What I really want is a way to find remote branches that
> are not merged with any of my local branches (or any origin
> branches). A slow and stupid implementation of that is in the
> attached git-unmerged script, and it weeds the branch list
> down to 68 branches, which are mostly really ones I might
> want to look at.
How about:

gitk $(git for-each-ref --format='%(refname)' 'refs/remotes/'; git for-each-ref --format='^%(refname)' 'refs/heads/')

You could also replace 'gitk' with 'git log', and mess with the --pretty=format:whatever parameter.

Have fun,
Avery
Previous: Joey HessNext: Joey Hess
Message 2 of 7 in “finding unmerged branches”
  1. Joey HessAug 27, 2009
  2. Avery PennarunAug 27, 2009
  3. Joey HessAug 28, 2009
  4. Björn SteinbrinkAug 27, 2009
  5. Junio C HamanoAug 27, 2009
  6. Joey HessAug 28, 2009
  7. Joey HessAug 28, 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.