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

Query for certain branches, but not the rest

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Nov 25, 2012, 09:24 UTC
Message-ID
<CAMP44s02=E3imOv00dwyXR13nQdo1XeZTjJb_y0EVQoyYMEcQw@mail.gmail.com>
Hi,
Suppose I have these branches:
  fc/feature-a
  fc/feature-b
  master
  next

I want to show this: fc/feature-a fc/feature-b ^master ^next. I can do 'git log --branches=fc' to show the branches that begin with fc/, but there's no way to specify the rest. If they were under a prefix, I could do '--not --branches=prefix', but they are not.

Anybody knows a way to query branches that don't have any prefix?
It appears this works:
% git for-each-ref refs/heads/*
But I would like something parsable by rev-parse.
Any ideas?
Cheers.
-- 
Felipe Contreras
Next: Jeff King
Message 1 of 2 in “Query for certain branches, but not the rest”
  1. Felipe ContrerasNov 25, 2012
  2. Jeff KingNov 28, 2012

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.