From the course: Learning Git and GitHub

Unlock this course with a free trial

Join today to access over 24,800 courses taught by industry experts.

Deleting and renaming files

Deleting and renaming files

- [Instructor] As you're working with your Git projects you'll need to rename, move, or delete certain files. The way that Git handles these normal file operations can be a bit confusing, so let's go over those. Now deleting is the simpler of the different functions that we can perform, so let's go ahead and start with that. There's two ways to delete files managed by Git. Now the first is the obvious, just deleting the file from your file system. And we can do that from Visual Studio code by right clicking on a file and then select and delete or using the shortcut rate here. You can also go to the operating system, look in your folder, and get rid of the files that way as well. Now if we do a Git status, you'll see that it records that deletion as a separate function. So it's actually recording a deletion as something that you need to add into staging. Now if you want to, you can go ahead and do Git add and then commit…

Contents