From: Mike Frysinger Date: Sat, 17 Feb 2018 01:36:15 +0000 (-0500) Subject: git rb-all: auto skip branches that don't track remotes X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=fc774894456c8f9bd22c3863502aabc21975c8fe;p=home.git git rb-all: auto skip branches that don't track remotes --- 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 }