From 62b01b17b90d81e1f41ec60316bc1f70b3235a97 Mon Sep 17 00:00:00 2001 From: xyz Date: Sun, 28 Aug 2022 18:10:53 -0700 Subject: combine gitfork and gitsetup --- home/xyz/.local/bin/gitfork | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'home/xyz/.local/bin/gitfork') diff --git a/home/xyz/.local/bin/gitfork b/home/xyz/.local/bin/gitfork index cefc4f68..9736c4cd 100755 --- a/home/xyz/.local/bin/gitfork +++ b/home/xyz/.local/bin/gitfork @@ -3,6 +3,8 @@ git clone "$1" cd "$(basename "$1" .git)" || exit git remote add upstream "$2" -git branch fly -git checkout fly -git push --set-upstream origin fly +if ! git checkout fly; then + git branch fly + git checkout fly + git push --set-upstream origin fly +fi -- cgit v1.2.3-70-g09d2