git equivalent for –all for all non-remote branches?

The --all parameter is used in various git commands to refer to all branches. Is there an equivalent for all non-remote branches?

(Specifically, this came up using git-filter-branch, I’d like to work on all local branches.)

  • How do I determine the source branch of a particular branch?
  • How to show all tagged commits not reachable by a branch?
  • Why is my local Git branch detached?
  • Delete local Git branches if their remote-tracking references don't exist anymore
  • Commit a file to a Different Branch Without Checkout
  • Managing Git branches and subbranches?
  • Why can't a branch name contain the 'space' char?
  • How do I create a branch without cloning?
  • One Solution collect form web for “git equivalent for –all for all non-remote branches?”

    UPDATE To the edit:

    The following worked on a test repo with local and remote branches, rewriting only local branches:

    git filter-branch --tag-name-filter cat -- --glob=refs/heads/*
    

    (the cat tag name filter is just an example, obviously)

    The --glob option is documented under man git-rev-parse for your information.


    git branch
    

    will already list all local branches.

    Then, there is also

    git for-each-ref -- --glob=refs/heads/*
    

    for local refs

    git for-each-ref -- --glob=refs/remotes/*/*
    

    for remote refs

    Git Baby is a git and github fan, let's start git clone.