17 / 57 · 17 Git & Version Control · Rebase vs Merge← prev⊞ allnext →☰ Read as one page
2.9Hands-On Exercise
- Create a feature branch, make 5 commits (including some "WIP" and "fix typo" commits)
- Rebase the branch onto the latest main
- Use interactive rebase to squash the WIP commits into clean, logical commits
- Intentionally create a conflict and practice resolving it during rebase
- Push with
--force-with-leaseand verify the clean history - Open a PR and use squash merge to complete it