Quantcast
Channel: User kubi - Stack Overflow
Viewing all articles
Browse latest Browse all 39

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

$
0
0

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 everythingsomefolder/*# exception to the rule!somefolder/.gitkeep 

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


Viewing all articles
Browse latest Browse all 39

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>