1. Go to your branch
Rebase replays the current branch, so switch to feature first.
git switch featureTyporithm · hard
Step 1 of 8 · intro card
Branching
git rebase replays your commits on top of another base for a linear history. It rewrites commit hashes, so never rebase shared or pushed history. --continue resumes after a conflict and --abort restores the original; interactive (-i) lets you squash, reorder, or edit the last N commits.
After git switch feature, git rebase main lifts your branch's commits and re-applies them one by one on top of main's tip, producing a clean linear history instead of a merge commit.
Because each commit is replayed, rebase rewrites their hashes — that is why you must never rebase history others have already pulled or that you have pushed. If a replay conflicts, fix the files and run git rebase --continue; git rebase --abort restores the branch exactly as it was.
Interactive rebase, git rebase -i HEAD~3, opens an editor listing the last three commits so you can squash them together, reorder them, or edit individual commits before they are rewritten.
rebase replays commits onto a new base for linear history.
It rewrites hashes — never rebase shared or pushed history.
-i lets you squash, reorder, or edit the last N commits.
git switch feature
git rebase main
git rebase --continue
git rebase --abort
git rebase -i HEAD~3Connect each part of the code to the concept before you type.
Rebase replays the current branch, so switch to feature first.
git switch featuregit rebase main re-applies feature's commits on top of main for a linear history.
git rebase main--continue proceeds with the rebase after you have resolved a conflict.
git rebase --continue--abort stops the rebase and returns the branch to its original commits.
git rebase --abort-i opens an editor to squash, reorder, or edit the last three commits.
git rebase -i HEAD~3Read the concept map and follow the code breakdown.
Type the implementation, repair mistakes and work through every recall exercise.
Use the final check without hints; revisit weak concepts in short practice sessions.