brewly — Ch.6 · Move a branch off another
Exercise 8 of 8
Before you start
rebase --onto
Sometimes a branch was started from another branch by accident. A plain rebase would drag both along.
git rebase --onto <new base> <old base> takes only the commits after the old base and replays them on the new base.
- git log --oneline --graph --all
- see which commits sit where
- git rebase --onto <new> <old>
- move the commits after <old> to <new>
You can reopen this any time with “Lesson”.
# BrewlyOrder coffee ahead.## Team- Maya (lead)- Alex (frontend)
Graph
- b7d58f2 Sharpen the sloganmain
- 3c74d12 Show a badge on new drinksHEAD → feature/badge
- 2e87b66 Draft a new checkoutfeature/new-checkout
- 1354d06 Add menu pageorigin/main
- 619eb3b Style the order button
- 5fc44ac Initial commit