Understand history before making it tidy.
A normal merge preserves existing commits and, when branches diverged, creates a merge commit with both histories as parents. A fast-forward just moves a pointer.
git switch feature/menu
git merge mainRebase takes commits from your branch and reapplies them on another base, usually producing new commit identities. The working changes can be similar while the history shape differs.
git switch feature/menu
git rebase mainAvoid rebasing commits other people already depend on unless your team explicitly coordinates it. Do not force-push just to make a graph look cleaner. Private feature work and shared history need different judgment.
For a paused rebase, edit, stage and rebase --continue. Rebase --abort backs out of the rebase. Merge uses merge --abort; do not mix them up.
git add RESOLVED_FILE
git rebase --continue
# Or choose to cancel the operation:
git rebase --abortWhich operation generally rewrites commit identities?
Choose an answer.
Command blocks are syntax examples checked against official documentation, not fabricated terminal output. Replace uppercase placeholders with your actual names and inspect status before commands that change work.
git-merge · git-rebase ·