From d0376cf544046b41edccdafdedadd87679b9eed2 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 12 Jan 2025 00:48:49 +0300 Subject: [PATCH] Feat(fork): Set URL for `upstream` --- fork | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fork b/fork index cbf5d9a..7238ada 100755 --- a/fork +++ b/fork @@ -15,8 +15,10 @@ if [ -d "$local_repo"/.git ]; then fi && if [ -d .git ]; then - git remote add upstream "$upstream" - git remote set-url origin "$origin" || git remote add origin "$origin" + git remote add upstream "$upstream" || + git remote set-url upstream "$upstream" + git remote set-url origin "$origin" || + git remote add origin "$origin" else git clone -o upstream "$upstream" "$local_repo" && cd "$local_repo" && -- 2.39.5