Instructor: Let's inspect the log history of the inaudible repository here. You can see here a couple of commits, and all of them have already been synced to the remote counterparts, so to the remote repository.
If that situation happens and if we want to undo, for instance, that first commit, we have to pay attention to not apply git commands, which actually change the commit IDs in front of here, such as git reset or git amend and so on.
Rather, what we have to do is to undo this in a safe manner. We can use the git revert command. We pick here the ID we want to revert, which could even be some commit further down here. We hit enter.
It will then open up in editing mode and tell us, "What kind of commit message would you like to apply?" We can either leave it like this or change it. Let's leave it like this. We save it.
If we log again, you can see that here a new commit has been created, which is the exact opposite of that commit here.
Basically, if we added here a couple of lines, this commit will exactly remove those lines that have been added here. Since we have created a new commit message here, we can save to push it after the remote repository.