From fc774894456c8f9bd22c3863502aabc21975c8fe Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 16 Feb 2018 20:36:15 -0500 Subject: [PATCH] git rb-all: auto skip branches that don't track remotes --- .bin/git-rb-all | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.bin/git-rb-all b/.bin/git-rb-all index 839d143..b4efb48 100755 --- a/.bin/git-rb-all +++ b/.bin/git-rb-all @@ -4,10 +4,15 @@ rb_one() { local b=$1 - echo "### ${b}" - git checkout -q "${b}" || exit - if ! git rebase ; then - git rebase --abort + printf "### ${b}" + if ! git config --local "branch.${b}.merge" >/dev/null; then + echo " -> skipping due to missing merge branch" + else + echo + git checkout -q "${b}" || exit + if ! git rebase ; then + git rebase --abort + fi fi } -- 2.39.5