In the middle of the desert you can say anything you want

17 Feb 2023

Git commit empty directories

TIL you can’t.

How do I add an empty directory to a Git repository? - Stack Overflow suggests:

  • Adding a .gitkeep
    • mostly clear purpose from the name and googleable
    • it’s not an established connection
    • some people think the .git- prefix should be reserved for git-specific files
  • Adding a .placeholder - same as above, but less clear but no .git- prefix
  • Adding a README explaining everything
  • Adding a .gitignore in the directory
Nel mezzo del deserto posso dire tutto quello che voglio.