Date | Phase |
---|---|
February 5th | Hotfix |
This morning the project manager received a frantic call from the EIC of Flavor magazine. The app was so successful that the writers have been inundated with emails from readers submitting their own recipes for consideration. The number of emails has been so great that their inboxes are completely useless. The magazine wants your team to remove the writers' email addresses from the app ASAP.
Start by looking at the diagram from the GitFlow article and find the hotfix.
Follow along with the activities below to walk through the process of creating a hotfix branch, then merging the hotfix into both the master
and develop
branches.
One Team Member
Create a branch off of master
named hotfix-1.0.1
:
$ git checkout master
# switch to master branch
$ git checkout -b hotfix-1.0.1
# create & switch to hotfix branch
Bump the patch number contained in the VERSION file:
major=1
minor=0
patch=1
Stage and commit your change:
$ git add app/VERSION
# stage changes to the version file
$ git commit -m "Bump version to 1.0.1"
After removing the email addresses from the main page (/app/index.md), stage and commit the change:
$ git add app/index.md
$ git commit -m "Remove email addresses from app"
Push the branch to origin (Github):
$ git push origin hotfix-1.0.1
Navigate to your GitHub fork and open the pull request. On the Pull Request interface, make sure that the base fork is your-username\git-flow-exercise
and the base branch is master
. This means that you are requesting to merge your changes into the master
branch of your forked copy of the repository.
We also want to merge the hotfix changes into develop
, so create a second Pull Request making sure that the base fork is your-username\git-flow-exercise
and the base branch is develop
.
Open each Pull Request in the Github interface and click the green "Merge pull request" button. Once the hotfix is merged into master
we can assume that the app is updated and the issue of writers receiving too much email is resolved.
Fetch the latest changes in master and develop branches to your local device, like you did in 4. Fetching Latest.
Next we will walk through the process of cutting a new release branch.