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

Re: Best way to specify all local branches and all remote branches.

From
Jakub Narebski <jnareb@gmail.com>
Date
Feb 11, 2008, 21:34 UTC
Message-ID
<m3abm7dvp1.fsf@localhost.localdomain>
In-Reply-To
<47B0B775.1050401@glidos.net>
Paul Gardiner <osronline@glidos.net> writes:
Show 13 quoted lines
> Johannes Schindelin wrote:
>> On Mon, 11 Feb 2008, Jakub Narebski wrote:
>>
>>> git-filter-branch [...] should support --all.
>>
>> It does.
> 
> Yep, it does. I'd forgotten how to drive the shell. It works if
> I put -- --all.
> 
> Turns out that isn't what I want though. I want just the local
> branches. Still can't find a way to do it other than my cd/ls
> thing.
I wrote: git-for-each-ref(1). See documentation, please.
  $(git for-each-ref --shell --format="%(refname)" "refs/heads/*")
-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Paul Gardiner
Message 6 of 6 in “Best way to specify all local branches and all remote branches.”
  1. Paul GardinerFeb 11, 2008
  2. Jakub NarebskiFeb 11, 2008
  3. Paul GardinerFeb 11, 2008
  4. Johannes SchindelinFeb 11, 2008
  5. Paul GardinerFeb 11, 2008
  6. Jakub NarebskiFeb 11, 2008

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.