brewly — Ch.7 · Copy several commits
Exercise 5 of 6
Before you start
Ranges and conflicts
git cherry-pick A..B copies every commit after A up to and including B, oldest first.
If one conflicts, solve the file, git add it and run --continue. Git then carries on with the rest. --abort returns to where you started.
-x adds a line to each message saying which commit it was copied from.
- git log --oneline <branch>
- find the ends of the range
- git cherry-pick <older>..<newer>
- copy the commits in between
- git add <file>
- mark a conflict solved
- git cherry-pick --continue
- commit it and go on
- git cherry-pick --abort
- give up
You can reopen this any time with “Lesson”.
# BrewlyOrder coffee ahead.## Team- Maya (lead)- Alex (frontend)
Graph
- a063ecb Adjust the espresso priceHEAD → main
- 1420266 Add the summer menufeature/summer
- f2a3c99 Round to cents
- e3c6a9c Correct the espresso price
- 1354d06 Add menu pageorigin/main
- 619eb3b Style the order button
- 5fc44ac Initial commit