Use the diff command to view changes between different files.
- [Instructor] Let's learn … how to view the changes in a file, … before we make a decision … about whether we want to commit them to the repository. … To do this, let's first make some changes to our project, … first get project. … And you can see I'm already navigated into that project in … the command line. … Let's bring up the text editor. … And let's make a few changes. … Let's go into first_file.Txt. … And let's add a couple of lines. … I'll put a blank line here, … this file comes before the others … and Git is tracking my changes. … Okay, so you don't type exactly what I type, … make sure you add at least to there. … Let's save it. … Let's come back over to the command line. … And let's type git status. … If we type git status, it tells us … that there is a change to this file, … but it doesn't tell us what the change was. … And especially if you're working in a lot of code … or something, you may forget what you've changed. … You may say wait a minute, … I'm surprised that I see a change in that file. …
- 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.