Aron Woost Aron Woost - 1 year ago 190
Git Question

How to .gitignore all files/folder in a folder, but not the folder itself?

Possible Duplicate:

How do I add an empty directory to a git repository

I want to check in a blank folder. How can I do this?

Answer Source

You can't commit empty folders in git. If you want it to show up, you need to put something in it, even just an empty file.

For example, add an empty file called .gitkeep to the folder you want to keep, then in your .gitignore file write:

# exclude everything

# exception to the rule

Commit your .gitignore and .gitkeep files and this should resolve your issue.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download