Interactive Rebase
Task
Rewrite the last four commits of the main branch using an interactive rebase.
Requirements
- Select the range of the last four commits.
- Keep all four commits and their order.
- Finish the interactive rebase so that the selected part of the history is created anew.
Expected result
main must end with a rewritten chain of four commits that starts after C1. HEAD must stay on main.
What you will learn
After completing the task, you will be able to:
- select a range for an interactive rebase;
- understand that rebase creates new copies of commits;
- control the order and contents of the rewritten history.
Goal
local