Gitflow
🖊️Fix Author on Just the Last CommitEasy+300 XP
Workshop
Scenario reference

Fix Author on Just the Last Commit: the situation, step by step

The situation

Last commit shows old email. Branch isn't pushed yet, so amending is safe.

`git commit --amend --reset-author --no-edit` rewrites author/email using current config.

Easy · 2 steps · +300 XP

What you will practice

This scenario walks through 2 steps, in order:

  1. 01Set the right email first
  2. 02Amend the last commit's author
Reveal the step-by-step commands

Try the terminal first — you learn more by doing. When you want to check yourself, here is the command for each step.

  1. 1. Set the right email first
    git config user.email you@company.com
  2. 2. Amend the last commit's author
    git commit --amend --reset-author --no-edit

Key takeaway

If the commit isn't pushed, --amend is the cleanest fix.