List all local git branches without an asterisk [duplicate] August 25, 2023 by Tarik You can use for-each-ref: git for-each-ref --format="%(refname:short)" refs/heads/