Skip to content

Instantly share code, notes, and snippets.

@ericclemmons
Created November 1, 2010 01:05
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save ericclemmons/657409 to your computer and use it in GitHub Desktop.
Save ericclemmons/657409 to your computer and use it in GitHub Desktop.
Bash script to merge, tag, & push the "develop" branch
#!/usr/bin/env bash
echo "Checking out master branch"
git checkout master
git pull origin master
git log master..develop
read -p "Review your changes..."
echo "Merging develop branch"
git merge develop
TAGSTAMP=`date +%Y-%m-%d.%H%M%S`
echo "Tagging as ${TAGSTAMP}"
git tag -a $TAGSTAMP
echo "Pushing commits and tags"
git push
git push --tags
echo "Checking out develop branch"
git checkout develop
git push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment