diff options
-rwxr-xr-x | home/xyz/.local/bin/gitfork | 8 | ||||
-rwxr-xr-x | home/xyz/.local/bin/gitsetup | 6 |
2 files changed, 5 insertions, 9 deletions
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 |