Learn to delete files from the repository.
- [Instructor] We've learned how to add and edit files. … Let's also learn how to use Git to track files … when they are deleted. … So that we can have some files to delete, … let's add a couple more files to our project. … I going to go into my text editor, … and in here, let's just add a couple more files, … new file, and I will call this file file_to_delete1.txt. … And I'll just save the changes there … and then let's add another one. … New file, file_to_delete2.txt. … Okay, so those show up as being new files. … If we come over here and we type git status … in the root of our git project, … you'll see they're both listed as untracked files. … Now if I delete one of these files right now, … it will just disappear. … No big deal. … Git isn't tracking these files. … They're not in our repository or in our staging tree, … they're only in our working directory right now. … So let's add them. … Let's do git add and I'll use the period … to say add everything. … Get status. … You'll see it's going to add two new files …
- 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.