Your PR has 5 commits: 'wip', 'wip2', 'fix tests', 'lint', 'finally'. Reviewers want one clean commit.
`git reset --soft HEAD~5` rewinds the branch pointer but leaves all five commits' changes staged — one `git commit` then replaces them.
Medium · 4 steps · +500 XP
This scenario walks through 4 steps, in order:
Try the terminal first — you learn more by doing. When you want to check yourself, here is the command for each step.
git reset --soft HEAD~5git commit -m "feat: complete feature x"git log --onelinegit push --force-with-leaseSoft-reset + commit is the editor-free squash: same result as `pick` + four `squash` lines, no rebase todo list to edit.