Does git ignore empty folders?

Solution 1:

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.

Solution 2:

Yes, git ignores empty folders.

You can add an empty .gitignore or .gitkeep file to any folders you want included.