A bash script to keep two git branch identical.

#!/bin/bash

git push
currentbranch=`git branch --show-current`
if [ "${currentbranch}" == "local" ]; then
   git checkout develop
   git merge local
   git push
elif [ "${currentbranch}" == "develop" ]; then
   git checkout local
   git merge develop
   git push
fi
git checkout $currentbranch

Don't ask why I wrote this foolish script. I have to do it 😀