Gitflow
✏️Fix a Commit Message Mid-BranchEasy+350 XP
Workshop
Scenario reference

Fix a Commit Message Mid-Branch: the situation, step by step

The situation

Three commits ago you wrote 'fix bug' but it was actually a feature. The whole team uses conventional commits.

Interactive rebase, mark that commit `reword`, edit the message, save.

Easy · 2 steps · +350 XP

What you will practice

This scenario walks through 2 steps, in order:

  1. 01Start interactive rebase past the bad commit
  2. 02After rewording in the editor, force push
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. Start interactive rebase past the bad commit
    git rebase -i HEAD~3
  2. 2. After rewording in the editor, force push
    git push --force-with-lease

Key takeaway

`reword` (r) in interactive rebase = change message only.