update all git branches, choose rebase or merge. -Xtheirs to favor master or -XOurs favors branch history
#!/bin/bash
for BRANCH in `git branch --list|sed 's/\*//g'`;
do
git checkout $BRANCH
git rebase -Xtheirs master
done
git checkout master;