brewly — Ch.4 · Undo something already shared
Exercise 5 of 9
Before you start
Never rewrite what others have
A pushed commit may already be on your teammates’ computers. Do not remove it. Add a new commit that does the opposite instead: that is git revert.
Git opens the editor with a ready-made message. Keep it with "Save and close".
git show <commit> displays one commit and its changes, so you can be sure which one to undo.
- git log --oneline
- find the commit
- git show <commit>
- see what it changed
- git revert <commit>
- commit the opposite change
- git push
- share the fix
You can reopen this any time with “Lesson”.
# BrewlyOrder coffee ahead. Skip the queue.## Team- Maya (lead)- Alex (frontend)
Graph
- e126b29 Sharpen the sloganHEAD → mainorigin/main
- 0910016 Show a zero total
- 1354d06 Add menu page
- 619eb3b Style the order button
- 5fc44ac Initial commit