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.)
- Git: Converting tag to branch in remote repo
- Git pull/push error: RPC failed; result=22, HTTP code = 408
- How do I push a local Git branch to master branch in the remote?
- When is it that I have to stash local changes in git while switching branches?
- Why does my git log output show both origin and origin/master, origin/HEAD when using a remote. These entries seem redundant to me
- Workflow for porting new features from a derivative fork
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