3 # reads the config file and pushes to all the remotes
5 config_path="$(git rev-parse --show-toplevel)/.git/config" 2>/dev/null
7 [ ! "$?" = 0 ] && echo "Failed: not a git repo." && exit 1
8 [ -z "$1" ] && echo "Failed: Please supply a branch to push to." && exit 1
10 # look for all remotes
11 cat "$config_path" | sed '/^\[remote "/!d; s/^\[remote "//; s/"]$//' |\
12 xargs -I _ git push _ "$1"