summaryrefslogtreecommitdiff
path: root/.config/fish/functions/git_sync_all.fish
blob: 35a56b6aadf2c25d2d8d16d4b0048a0359f6c5b1 (plain)
1
2
3
4
5
6
function git_sync_all
        for branch in (git branch --all | grep '^\s*remotes' | egrep --invert-match '(:?HEAD|master)$');
            git checkout (echo $branch | awk -F'/' '{print $1="\r"; $2="\r"; print;}' | xargs | sed 's/ /\//g');
            git pull -p
        end
end