How to Delete Files in Git


show more Deleting files provides you with in-depth training on Developer. Taught by Kevin Skoglund as part of the Git Essential Training show less
please wait ...

Deleting files

In this movie we're going to learn how to delete files and track those deletions using Git. To do that, let's create a couple of files that we can throw out. We're going to keep first, second, and third file, let's make a couple of new ones here, and I'll just call this one This is a file to delete. We'll save that as file_to_delete1.txt, and then we'll just do a Save As, make it file_to_delete2. So, we'll close that up.

We've now got two files here. I'm going to add those to the repository. If I just do git status now, these show up as untracked files. So, if I delete these, well then they just stop being tracked files, right? When we talk about deleting files, we're talking about deleting them from the repo. We're talking about the things that are tracked files. So, the first thing we need to do is add these to our repo, and then we can go about deleting them. So, let's do git add, and we will add everything that's in our working directory. S...

Deleting files
Video duration: 5m 29s 6h 25m Beginner

Viewers:

Deleting files provides you with in-depth training on Developer. Taught by Kevin Skoglund as part of the Git Essential Training

Subject:
Developer
Software:
Git GitHub
Author:
please wait ...