Skip to content

Instantly share code, notes, and snippets.

@learnist
Created June 12, 2009 17:41

Revisions

  1. grockit revised this gist Jun 30, 2009. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions Cherry picking a bug fix to production
    Original file line number Diff line number Diff line change
    @@ -17,5 +17,8 @@ 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
  2. grockit revised this gist Jun 12, 2009. 1 changed file with 17 additions and 2 deletions.
    19 changes: 17 additions & 2 deletions Cherry picking a bug fix to production
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,21 @@
    # Get the latest production tag
    git tag -l 'production/*' | tail -1
    git branch production_bugfix `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
    git push origin production_bugfix

    # Push your local branch to the origin (creates a remote ref)
    git push origin production_bugfix

    # Enjoy reward
    http://www.youtube.com/watch?v=2x2W12A8Qow
  3. grockit created this gist Jun 12, 2009.
    6 changes: 6 additions & 0 deletions Cherry picking a bug fix to production
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    git tag -l 'production/*' | tail -1
    git branch production_bugfix `git tag -l 'production/*' | tail -1`
    git co production_bugfix
    git log master
    git cherry-pick 2ca4ba06e4494c548ccc8d9acd964d3f10da4e4d
    git push origin production_bugfix