Master interactive rebase to rewrite commit history: squash commits, reword messages, reorder changes, and create a clean, professional Git history.
Set up a repository with messy commit history that we'll clean up using interactive rebase.
mkdir -p ~/git-practice/lesson-302
cd ~/git-practice/lesson-302
git init
echo "# Task Manager" > README.md
git add README.md
git commit -m "Initial commit"
We'll create a repository with intentionally messy commits to practice cleaning up history before sharing with others.
Repository initialized with an initial commit.