Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating a new directory in Heroku

Tags:

django

heroku

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

like image 392
Kar Avatar asked Oct 06 '22 04:10

Kar


1 Answers

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.

Regarding committing an empty directory

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?

like image 175
Will Schoenberger Avatar answered Oct 10 '22 03:10

Will Schoenberger