Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@larsar
Created February 16, 2013 18:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save larsar/4968158 to your computer and use it in GitHub Desktop.
Save larsar/4968158 to your computer and use it in GitHub Desktop.
# Checkout
git tag # List tagged versions
git checkout -b prodfix <version> # Checkout specific version into prodfix branch
# Fix code and commit
# Test in staging (requires compatible database state)
git push staging +HEAD:master # Push to staging
# Put in producton
git push production +HEAD:master # Push to production
git tag -a v<VERSION> -m "v<VERSION> <Comment>" # Create a tag for latest version
git push --tags origin # Push tags to github
# Merge with master
git checkout master
git merge prodfix
git push origin master
git push staging master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment