git equivalent for –all for all non-remote branches?
--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.)
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/*
cat tag name filter is just an example, obviously)
--glob option is documented under man git-rev-parse for your information.
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