How can I add an empty directory (that contains no files) to a Git repository?
Andy Lester is right, but if your directory just needs to be empty, and not empty empty, you can put an empty .gitignore
file in there as a workaround.
As an aside, this is an implementation issue, not a fundamental Git storage design problem. As has been mentioned many times on the Git mailing list, the reason that this has not been implemented is that no one has cared enough to submit a patch for it, not that it couldn’t or shouldn’t be done.