brewly — Ch.2 · Started on the wrong branch
Exercise 4 of 7
Before you start
Uncommitted changes travel with you
Changes you have not committed belong to your folder, not to a branch. Creating a new branch keeps them, so you can still commit them in the right place.
- git status
- which branch am I on, and what changed?
- git switch -c <name>
- create a branch; your changes come along
- git add <file>
- stage a file
- git commit -m "What you did"
- commit it on the new branch
You can reopen this any time with “Lesson”.
export const menu = [{ id: 'espresso', name: 'Espresso', price: 2.2 },{ id: 'flat-white', name: 'Flat white', price: 3.4 },{ id: 'oat', name: 'Oat flat white', price: 3.9 },]
Graph
- 1354d06 Add menu pageHEAD → mainorigin/main
- 619eb3b Style the order button
- 5fc44ac Initial commit