In Step 2 of the exercise, you should replace <COMMIT_HASH>
with the unique identifier (hash) of the commit you want to revert.
Here’s how to find the commit hash:
-
View your commit history using:
git log
- This command displays a list of commits in reverse chronological order, including their commit hashes (a long string of characters) and commit messages.
-
Identify the commit you want to revert by looking at the commit message or other details. The commit hash will look something like this: a1b2c3d4
.
-
Use the first few characters of the hash (usually 7-10 characters) to revert the commit:
git revert a1b2c3d4
- Replace
a1b2c3d4
with the actual commit hash you found in the log.
This will create a new commit that undoes the changes introduced by the specified commit, effectively "reverting" it.