brewly — Ch.8 · Ship a hotfix
Exercise 4 of 5
Before you start
The hotfix routine
Fix on the release branch (press "Write the code"), commit, and tag the new patch version.
--follow-tags pushes your commits together with their annotated tags.
Then copy the fix to main with cherry-pick, so the bug does not return in the next release. -x notes where the commit came from.
- git commit -am "What you fixed"
- commit the fix
- git tag -a <version> -m "message"
- tag the patch release
- git push --follow-tags
- push the commits and their tags
- git switch main
- go to main
- git cherry-pick -x <branch>
- copy the newest commit of that branch
- git push
- publish main
You can reopen this any time with “Lesson”.
export function renderCart(cart) {const total = cart.reduce((sum, item) => sum + item.price, 0)document.querySelector('#total').textContent = total.toFixed(2)}
Graph
- de14ee9 Start loyalty cardsorigin/mainmain
- 1354d06 Add menu pageHEAD → release/1.0tag: v1.0.0origin/release/1.0
- 619eb3b Style the order button
- 5fc44ac Initial commit