0 votes
1 view
in Devops and Agile by (16.9k points)

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

1 Answer

0 votes
by (22.3k points)

You cannot commit empty folders in git. In case 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

somefolder/*

# exception to the rule

!somefolder/.gitkeep 

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

...