Skip to content

Instantly share code, notes, and snippets.

@learnist
Created June 12, 2009 17:41
Show Gist options
  • Save learnist/128786 to your computer and use it in GitHub Desktop.
Save learnist/128786 to your computer and use it in GitHub Desktop.
Cherry picking a bug fix to production
# Get the latest production tag
git tag -l 'production/*' | tail -1
> production/20090610235902
# Create a local production_bugfix branch
git branch production_bugfix production/20090610235902
# Checkout or "switch" to the production_bugfix branch
git co production_bugfix
# Find the commits that you would like to cherry pick
git log master
# Do the cherry pick
git cherry-pick 2ca4ba06e4494c548ccc8d9acd964d3f10da4e4d
# Push your local branch to the origin (creates a remote ref)
git push origin production_bugfix
# Deploy it
cap production deploy TAG=#{commit_id}
# Enjoy reward
http://www.youtube.com/watch?v=2x2W12A8Qow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment