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.)

  • git bisect in one command
  • Git, ignore all files except a few in subdirectories
  • Creating a hidden directory in a repository
  • GitHub: Can't find remote repository after re-installation
  • Pip freeze gives me this error related with git
  • Check if directory is a Git root in one command
  • Google Closure Library release management
  • Why can I pull from a bare repo on dropbox?
  • How do I make a Git commit in the past?
  • How to upload file on website hosted by Heroku?
  • Edit a commit message in the pushed code
  • How to push to multiple git repositories with different setups?
  • 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.