You set up a new laptop and forgot to configure git. Last 4 commits show `you@old-job.com`. Your manager wants the company email everywhere.
Fix config first, then amend the last commit, then rebase to fix the older ones.
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 config user.email you@new-job.comgit commit --amend --reset-author --no-editgit rebase -i HEAD~4 --exec 'git commit --amend --reset-author --no-edit'git push --force-with-leaseSet user.email globally on every machine to avoid this.