Skip to content

Instantly share code, notes, and snippets.

@cpb
Last active December 11, 2015 02:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cpb/4533406 to your computer and use it in GitHub Desktop.
Save cpb/4533406 to your computer and use it in GitHub Desktop.
Unfortunately, this is the bulk of my work these days
#!/bin/bash
read -p "Branch? " branch
echo
git co $branch
git pull origin $branch
git rebase az/master
read -p "Clean rebase? " -n 1 rebase
echo
if [[ ! $rebase =~ ^[Yy]$ ]]
then
exit 1
fi
git push origin HEAD -f
git co az/master
git merge $branch --no-ff
read -p "Clean merge? " -n 1 merge
echo
if [[ ! $merge =~ ^[Yy]$ ]]
then
exit 1
fi
git push origin HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment