Empty folders in repository

I have gleaned that github does not allow empty folders in project repositories. I can easily work around this by having a README file in an otherwise folder, but am wondering:
– Why does github have this policy?
– Is there a way to change this policy for a single repository?

That is not a GitHub policy, it’s a technical concept in git. Git tracks files, not directories, so you have to have a file in a directory to have it created on checkout.

You’ve already described one workaround (keep a file in the directory), another option would be to create the directory as part of the build process of your project (if any).

@airtower-luna is correct. This is an implementation detail of git, not a GitHub policy or configuration.

Many people use a zero-length file with the name .gitkeep to force git to keep a path available by convention. Following this convention is a good shorthand way to signal your intention.

All good ideas. The README serves another purpose – explains why there is an empty folder, from the perspective of the project. Thanks all for your comments.