Laurie Young Laurie Young - 1 year ago 120
Git Question

How can I add an empty directory to a Git repository?

How can I add an empty directory (that contains no files) to a Git repository?

Answer Source

Another way to make a directory stay empty (in the repository) is to create a .gitignore file inside that directory that contains four lines:

# Ignore everything in this directory
# Except this file

Then you don't have to get the order right the way that you have to do in m104's solution.

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