3 # you can pass in git parameters to this script too
5 # git-pushall git --git-dir=$HOME/.dotfiles --work-tree=$HOME
8 # [ -z "$cmd" ] && cmd="git"
10 # config_path="$($cmd config --local -l)" 2>/dev/null
11 # [ ! "$?" = 0 ] && echo "Failed: not a git repo." && exit 1
13 # echo "$config_path" | grep '^remote.*.url=' |\
14 # sed 's/^remote.*.url=//' |\
15 # xargs printf "$cmd push %s master\n" |\
17 [ -z "$1" ] && echo "Please provide a branch to push to" && exit 1
19 config_path="$(git config --local -l)" 2>/dev/null
20 [ ! "$?" = 0 ] && echo "Failed: not a git repo." && exit 1
22 echo "$config_path" | grep '^remote.*.url=' |\
23 sed 's/^remote.*.url=//' |\
24 xargs -I _ git push _ "$1"