-
Notifications
You must be signed in to change notification settings - Fork 24
Hotfix Git Workflow
Branching model for Hotfix based off: http://nvie.com/posts/a-successful-git-branching-model/
Make sure to make hotfix changes are in a separate branch so they can be merged back into develop and master separately.
-
Pull latest into master:
git checkout master
, thengit pull origin master
-
Branch from master, not from develop:
git checkout -b release-x.y.z master
-
Make changes and test
Merge your changes back into master and prepare to deploy them out to the servers.
-
git fetch
-
git checkout master
-
git pull origin master
-
git merge release-x.y.z master
-
git tag -a vx.y.z -m 'Hotfix for release vx.y.z'
You can find the version numbers: https://github.com/psu-stewardship/scholarsphere/releases -
git push origin master
-
git push --tags
Test the deployment to staging. Have you changed the Data model? Yes? Go to Step 1. No? Go to Step 2.
cap stage_new deploy BRANCH_NAME=master
Have you changed the Data model? Yes? Go to Step 1. No? Go to Step 2.
- Deploy during the maintenance window
cap prod_new deploy BRANCH_NAME=master
Include the new released version in the develop branch.
-
git fetch
-
git checkout develop
-
git pull origin develop
-
git merge release-x.y.z develop
Now the hotfix branch can be deleted
-
git branch -d release-x.y.z
-
git push origin :release-x.y.z