Learn how to tell Git to ignore files that are already being tracked, not just new, untracked files.
- [Instructor] When we created a .gitignore file earlier, … git ignored any untracked files that matched … a rule in the .gitignore file. … However, it only applied those rules to untracked files, … files that are already being tracked are not ignored. … Let's learn how to tell git to ignore … changes to files it is already tracking. … Let me demonstrate it step by step. … So, first let's see what the problem is … and lets add a new file to our repository. … So I'll create a new file here … and I'm going to call that file db_config.txt … and I'm going to just put a basic sort of fake … database configuration in here, project_database, … user: web user, okay so I've got some … configuration information, it's a new file. … If we come over here, we see that new file, … git add db_config, … git commit with M, … add database configuration file. … Okay, so we've just done a basic commit of this file … so this file is now being tracked, right? … If I make changes to it, then we know that git …
- 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.