Learn how to completely undo a previous commit by using the revert command.
- [Instructor] We've been looking at different ways … that we can undo changes after we've made commits … to our repository. … In this movie, I want us to learn … how you can revert a commit. … Reverting a commit essentially means to just undo it, … to do the opposite, to go backwards. … If you made changes a, b, and c, … then it undoes changes a, b, and c. … Let's take a look at our git log … and, in the last movie, we were looking at … the changes to the title of the Explorers page here. … I'll copy that shaw, let's do git show, … and you can see, we just simply changed the … h1 from come make a few friends to make new friends. … Now we've decided, you know what, that was a mistake. … We should not have done this. … We want to now revert this commit … back to what it used to be. … Just go backwards, undo the change. … We don't want to go in and make edits to this commit, … because it's now part of a chain of commits … and git doesn't want us to make changes once … things are in the history and part of that chain …
- Exploring the history of version control
- Installing Git on Mac, Windows, and Linux
- Initializing a repository
- Writing useful commit messages
- The Git three-tree architecture
- Tracking when files are added, edited, deleted, or moved
- Viewing change sets and comparing versions
- Undoing changes and retrieving previous versions
- Ignoring changes to select files
Skill Level Beginner
1. What Is Git?
2. Install Git
3. Getting Started
4. Git Concepts and Architecture
5. Make Changes to Files
6. Use Git with a Real Project
7. Undo Changes
8. Ignore Files
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.