stonean

trying to be better than I was yesterday

git cherry-pick

Monday September 14, 2009 @ 10:13 AM (UTC)

How to patch production code:


  # Grab the current production code
  git checkout -b name <tag|sha>

  # Update your code with the commit that will fix your problem.
  git cherry-pick <sha>

  # Show difference.  This is a review step.
  git diff <tag>..

  # Run your tests...

  # Create a new annotated tag
  git tag -a <tag name>

  # Push the new tag up so you can deploy it
  git push --tags

Comments

Note: If you use capistrano and use the copy_cache functionality, you should clear your cache before doing a deploy.

For some reason the tags don’t show up properly if you don’t clear the cache.

Gravatar icon
Thursday October 15, 2009 @ 09:31 PM (UTC)
New comment

required, won't be displayed

optional

Don't type anything here unless you're an evil robot:


And especially don't type anything here:

Basic XHTML (including links) is allowed, just don't try anything fishy. Your comment will be auto-formatted unless you use your own <p> tags for formatting. You're also welcome to use Textile.

Copyright © 2010 stonean. All rights reserved.
Powered by Thoth.