How to add to GIT repo an empty folder with ignored contents

So you need a placeholder folder in your project, like a .tmp folder or media or data. AFAIK you can not add an empty folder to to GIT repo, to overcome this you have to place a placeholder file an ignore everything else. I like the .gitignore to be this placeholder file, and to ignore everything else in it’s folder put this inside it:



Leave a Reply

Back to Top