57

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

Slava Babin
  • 708
  • 2
  • 12
  • 30
Shiva
  • 11,485
  • 2
  • 67
  • 84

1 Answers1

152

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, marks 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 they might not disturb you.

randy
  • 369
  • 4
  • 12
Paweł Dawczak
  • 9,519
  • 2
  • 24
  • 37