I'm very new to Heroku and I've just pushed my Django app into Heroku. Does anyone know how to create a 'log' directory under '/app'? Is /app the top directory of my app?
Thanks
Is the log directory in your .gitignore
file? If /log
is an unversioned directory then K Z's answer should help regarding Heroku; unless something else is going on with Heroku and the log directory in your repo.
You cannot commit empty directories to git, but you can add a .gitignore
file in a directory that ignores all files inside except itself. This would be as close as you can get to versioning an empty directory as I'm sure you don't want to version control your log files.
Make sure the log directory is not in your main .gitignore
file. Then in your log directory create a new .gitignore
that contains the following:
# Ignore everything in this directory
*
# Except this file
!.gitignore
You can check out Jamie Flournoy's answer here How can I add an empty directory to a Git repository?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With