Join egghead, unlock knowledge.

Want more egghead?

This lesson is for members. Join us? Get access to all 3,000+ tutorials + a community with expert developers around the world.

Unlock This Lesson
1×
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.

Autoplay

    Change the Commit Message of a Previous Commit with Interactive Rebase

    gitgit

    We'll go back into our history with

    git log --oneline

    and then we can pick a previous commit and change its commit message with an interactive rebase. (Note: you shouldn't try to do this on commits that have already been pushed - only commits you still have locally)

    To start the interactive rebase, we'll use:

    git rebase -i HEAD~3

    and then change pick to reword. Then we can reword the commit message and the commit will be rewritten for us.