DEV Community

Lalith Madhav
Lalith Madhav

Posted on

Understanding Git: Why Folders Aren't Tracked

Found that Git doesn't track a folder. It tracks the contents in the folder. A folder acts as a container, while the files are the contents. To track an empty folder one must add a file even if it's empty. 1) The standard naming would be ".gitkeep". -jck

Top comments (2)

Collapse
 
realjck profile image
jck

The standard method is usually to create a .gitkeep file there.

Collapse
 
lalithmadhav profile image
Lalith Madhav • Edited

I'll edit it now. Is that how it's done? It's my first time into blogging.