brewly — Ch.4 · Throw an experiment away
Exercise 3 of 9
Before you start
Really throwing away
git reset --hard <commit> moves the branch and overwrites your files to match. Uncommitted changes to tracked files are lost for good, so read git status first.
It leaves untracked files alone. git clean deletes those. -n only shows what would go, and -f does it. Ignored files such as .env are kept.
- git status
- what would I lose?
- git reset --hard <commit>
- move the branch and overwrite files
- git reset --hard HEAD
- only throw away uncommitted changes
- git clean -n
- preview which untracked files would be deleted
- git clean -f
- delete them
You can reopen this any time with “Lesson”.
export const menu = [{ id: 'espresso', name: 'Espresso', price: 1.0 },{ id: 'flat-white', name: 'Flat white', price: 3.4 },]
Graph
- 0828211 Try a discount engineHEAD → main
- 1354d06 Add menu pageorigin/main
- 619eb3b Style the order button
- 5fc44ac Initial commit