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 +++++--- home/xyz/.local/bin/gitsetup | 6 ------ 2 files changed, 5 insertions(+), 9 deletions(-) delete mode 100755 home/xyz/.local/bin/gitsetup (limited to 'home') 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 diff --git a/home/xyz/.local/bin/gitsetup b/home/xyz/.local/bin/gitsetup deleted file mode 100755 index 56f91d76..00000000 --- a/home/xyz/.local/bin/gitsetup +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -git clone "$1" -cd "$(basename "$1" .git)" || exit -git remote add upstream "$2" -git checkout fly -- cgit v1.2.3-70-g09d2