git-merge-workshops / git-it-right

In this workshop, participants will learn the basics of common Git commands used in various situations. This includes commands which help you examine repo history and state while also learning to manipulate repo history.
5 stars 0 forks source link

Exercise - Undoing git commit #4

Open bryantson opened 2 years ago

bryantson commented 2 years ago

Exercise - Undoing git commit

  1. Make a change to a file
  2. Do git add file_name, git commit -m "some commit message" to make a commit
  3. Check git log. Copy the latest commit SHA you made.
  4. Initialize the revert: git revert <SHA>
  5. Type a commit message.
  6. Check your new commit by git log command
  7. Check that your file got reverted
bryantson commented 2 years ago

Congratulation. You are done with "Exercise - Undoing git commit" section

mona

Let's move to the next issue