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
}
local orig b branches
orig=$(git rev-parse --abbrev-ref HEAD) || return
- branches=( $(git ls-remote . 'heads/*' | sed 's:.*refs/heads/::') )
+ branches=( $(git ls-remote --heads . | sed 's:.*refs/heads/::') )
for b in "${branches[@]}" ; do
rb_one "${b}"
done