Does git ignore empty folders?

Git doesn’t ignore empty directories. It ignores all directories. In Git, directories exist only implicitly, through their contents. Empty directories have no contents, therefore they don’t exist.

Or to put it another way: Git is a content tracker. Empty directories are not content.

Leave a Comment