Instructor: Here I am in a Git repo with only one commit, called first commit.
The right-hand side of the screen is showing the continuous output of the Git log command. Type "touch one, two, three, four" to create four new files. Let's add each of this to the Git repository one at a time -- git add one, git commit -m one, git add two, git commit -m two.
You'll see as we add these commits, they appear on the right-hand side of the screen. Let's add the third one, but this time, when we type git commit -m, we're going to misspell it on purpose. I'm going to add a bunch of Es in there. Let's carry on and add four, git commit -m four.
Now on the right-hand side, we can see all four additional commits -- one, two, three, and four. We're going to use the interactive rebase command to adjust the misspelled commit message.
To do that, we'll type "git rebase -i," followed by a commit hash that was made before the one we want to change. In this case, we use the commit hash for first commit, 5c34605.
That's going to pull up a screen like this, which lists all of the commits made after the one that we chose -- one, two, three, and four. It also provides a list of commands we can choose from to apply to each of those commits, including pick, reword, edit, and squash.
Each of these commands comes with a shorthand, like p, or r, or e for edit, that we can use to apply to one or more of these commits. In our case, we want to reword the commit that says "three" there. Let's go to the line and replace "pick" with "r." Then we'll save this file.
That will bring us to a screen where we can edit the commit message. Let's change this "three" down to "three" spelled correctly, and save the file. Now you can see in our log that we have the commits four, three, two, one, and each of them are spelled correctly.