Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails : why is there .keep file in every directory [duplicate]

I see .keep file in every directory in rails skeleton.
what is that file for?
What is its significance?

like image 862
illusionist Avatar asked Mar 21 '15 13:03

illusionist


1 Answers

This is not for Rails actually, this is for git.

Git doesn't track "empty" directories, so, the directories like eg. "/logs" wouldn't end up in the repository. Having a .keep in it, makes the directory to be tracked.

Updates:

In Unix based systems, files starting with a dot(.) are considered hidden and do not appear in the UI. Hence might not disturb you.

like image 60
Paweł Dawczak Avatar answered Oct 01 '22 10:10

Paweł Dawczak