From c0decdc2e08ad123e7c5b80877b920dca16b0b54 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 28 Jan 2025 14:32:46 +0300 Subject: [PATCH] Add script `add-remote` --- add-remote | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 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" -- 2.39.5