From the course: Complete Guide to Git

Unlock the full course today

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

Track empty directories

Track empty directories - Git Tutorial

From the course: Complete Guide to Git

Track empty directories

- [Instructor] In this movie, I want us to talk about the way that Git tracks empty directories. Git is designed to be a source code management system. And source code lives in files, so it tracks files. It also tracks the directories that organize those files because that organization is important. However, Git ignores directories that do not have any files in them. It has no use for them, there's no source code inside of them. However, there are times where we do want to include these empty directories in our project. We want them to travel with the project and if someone were to download a copy of our project from the repository, we want them to be able to have that empty directory as a starting point, like a placeholder. The way that we get around this issue is simply to add a file to any otherwise empty directory that we want to track. And it can be a very tiny file, it doesn't have to have any content at all, it just has to be a file so that Git will pay attention to it. So the…

Contents