wiki:Hotfix

How to hotfix

You may encounter an issue that urgently needs to be fixed on the live site, in the middle of a development cycle. Following the suggestions on http://nvie.com/posts/a-successful-git-branching-model/ here is how to do it:

  1. Switch to master branch and make sure you are up-to-date
    git checkout master
    git pull
    
  2. Create hotfix branch and change into it
    git branch some-urgent-hotfix
    git checkout some-urgent-hotfix
    
  3. Fix the issue..
  4. Commit the fix
    git commit -a -m "Hotfix for .."
    
  5. Instead of fixing in branch you can use git cherry-pick <commit> to pull it from somewhere else
  6. Merge fix into master
    git checkout master
    git merge --no-ff some-urgent-hotfix
    
  7. Merge fix into develop to keep master and develop in sync
    git checkout develop
    git merge --no-ff some-urgent-hotfix
    
  8. Push changes in develop and master branch to central repository
    git push
    
  9. Deploy www and alpha
Last modified 4 years ago Last modified on Oct 15, 2012 10:47:22 AM