$ ./guess_the_languageGit
Git · medium · #6

Why is nothing staged for logs/?

$ mkdir logs
$ git add logs
$ git status --short
(no output)
  1. New folders are ignored until committed
  2. Directories need git add -r to stage
  3. Git tracks files, not empty directories
  4. The name logs is reserved by Git
Trees only record entries for content, so an empty directory has nothing to store. A placeholder file such as .gitkeep is the usual workaround.
Play Git ▸