Git In-depth

Git Revert

Git In-depth

Check out a free preview of the full Git In-depth course

The "Git Revert" Lesson is part of the full, Git In-depth course featured in this preview video. Here's what you'd learn in this lesson:

Nina discusses git revert command, which creates a new commit that introduces the opposite changes from the specified commit while the original commit stays in the repository.

Preview
Close

Transcript from the "Git Revert" Lesson

[00:00:00]
>> Nina Zakharenko: Now, Git Revert is the safe reset. What if you need to undo changes that are shared, they're public, you push them? Git Revert is going to create a new commit that introduces the opposite changes from the specified commit. The original commit is going to stay in the repository.

[00:00:17]
And revert does not change history. So here, I'm picking a commit to undo. And when I Git Revert it, Git is going to create a new commit that is the mirror opposite of the one that you specified.

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now