From: Oleg Broytman Date: Tue, 28 Jan 2025 11:32:46 +0000 (+0300) Subject: Add script `add-remote` X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=HEAD;p=cookiecutter.git Add script `add-remote` --- diff --git a/add-remote b/add-remote new file mode 100755 index 0000000..c6f96e2 --- /dev/null +++ b/add-remote @@ -0,0 +1,10 @@ +#! /bin/sh + +if [ -z "$1" -o -z "$2" ]; then + echo "Usage: $0 remote_name URL " >&2 + echo "Example: $0 gh https://github.com/phdru/cookiecutter.git" + exit 1 +fi + +git remote add "$1" "$2" && +exec git config --add update-remotes.remotes "$1"