From b9478d64b770919b34308838335a91cfbd739abb Mon Sep 17 00:00:00 2001 From: Balazs Nadasdi Date: Tue, 7 Oct 2014 10:57:00 +0200 Subject: [PATCH] fix #180 and #232 feature|bug|refactor checkout If branch creation in feature|bug|refactor returns a non-zero value then simply try to switch to branch --- bin/git-bug | 1 + bin/git-feature | 1 + bin/git-refactor | 1 + 3 files changed, 3 insertions(+) diff --git a/bin/git-bug b/bin/git-bug index 3738654..662c660 100755 --- a/bin/git-bug +++ b/bin/git-bug @@ -11,4 +11,5 @@ else fi branch=bug/$1 git checkout -b $branch &> /dev/null + test -n $? && git checkout $branch &> /dev/null fi diff --git a/bin/git-feature b/bin/git-feature index 4a1eed0..d44eec5 100755 --- a/bin/git-feature +++ b/bin/git-feature @@ -11,4 +11,5 @@ else fi branch=feature/$1 git checkout -b $branch &> /dev/null + test -n $? && git checkout $branch &> /dev/null fi diff --git a/bin/git-refactor b/bin/git-refactor index 1130956..a19afbd 100755 --- a/bin/git-refactor +++ b/bin/git-refactor @@ -12,4 +12,5 @@ else fi branch=refactor/$1 git checkout -b $branch &> /dev/null + test -n $? && git checkout $branch &> /dev/null fi