#! /usr/bin/env bash # #for branch in $(git for-each-ref --format='%(refname)' refs/heads/); do # echo "${branch/'refs/heads/'/''}" #done function test() { git for-each-ref --format='%(refname)' refs/heads/ }