]>
git.wh0rd.org - home.git/blob - .bin/git-rb-all
2 # Helper to rewrite all local branches.
8 if ! git config
--local "branch.${b}.merge" >/dev
/null
; then
9 echo " -> skipping due to missing merge branch"
12 git checkout
-q "${b}" ||
return
13 if ! git rebase
; then
27 if [[ $# -ne 0 ]] ; then
31 # Switch to the top dir in case the working dir doesn't exist in every branch.
32 cd "$(git rev-parse --show-toplevel)" ||
return
35 orig
=$
(git rev-parse
--abbrev-ref HEAD
) ||
return
37 branches
=( $
(git ls-remote
--heads . |
sed 's:.*refs/heads/::') )
38 for b
in "${branches[@]}" ; do
42 git checkout
-q "${orig}"