Discover how to undo changes to files in the working directory.
- [Instructor] In this chapter, … we will learn different techniques to undo changes in Git. … Those may be changes to the working directory, … to the staging index, … or even changes committed to the repository. … Let's start by looking at how we undo changes … in the working directory. … To give you an example, … let's imagine that we're working on a page. … Let's go ahead and just open up index.html … and let's say that we've made some changes to the page. … Now these might be changes we made on purpose … or on accident. … What I'm going to do is I'm going to take the site navigation here … and I can collapse it down. … I'm going to take the entire site navigation and delete it. … Maybe I did it by accident … but the site navigation is now gone from this page. … I'll save the changes and let's go run and take a look. … We'll reload the page. … You can see that it's gone. … Well, that's not what I wanted. … So how do I get those changes back? … Let's say that I've already closed this file, right? …
- 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.