3 if [ $# -lt 2 ] || [ $# -gt 3 ]; then
4 printf 'usage: %s <remote name> <url> [<branch>]\n' "$0" 1>&2
12 if [ -z "$name" ]; then
13 printf 'Need a remote name\n' 1>&2
16 if [ -z "$url" ]; then
17 printf 'Need a URL\n' 1>&2
20 if [ -z "$branch" ]; then
24 if git remote add --no-tags -t "$branch" "$name" "$url"; then
25 cp .git/config ../etc/git-config