From the course: Complete Guide to Git
Unlock the full course today
Join today to access over 24,000 courses taught by industry experts.
Remove untracked files - Git Tutorial
From the course: Complete Guide to Git
Remove untracked files
- [Instructor] In this movie, we will learn how to use git to remove untracked files from the working directory. We've previously seen that git notices when a new file is added to a project. We learned how to add that file to the repository so that git will track it. But sometimes we do not want to track files that show up in the project directory. Common examples might be files that we thought we would need during development, but then realize that we didn't actually need, now we want to just get them out of our project. Maybe there's temporary files such as files that were created from output of certain commands, or maybe it's compiled code or it might be operating system artifacts. And all of these cases we could go through and remove these files by hand, one by one. But git also has a command to remove them all at once, and that is git clean. Let me show you how it works. Let's first create some files that we don't want. There's a number of ways we could do that. I'm just going…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.