Adam Johnson personal blog
Don't create .gitkeep files, use .gitignore instead (2023)
Git only tracks files, not directories. It will only create a directory if it contains a tracked file. But sometimes you need to “track” a directory, to ensure it exists for fresh clones of a repository. For example, you might need an output directory called build.
- Points
- 202
- HN comments
- 94
- Submissions
- 1
- Cited by
- 0 commenters
Software EngineeringTools & Productivity2026
On Hacker News
| Submitted | Title on HN | Points | Comments |
|---|---|---|---|
| Feb 20, 2026 | Don't create .gitkeep files, use .gitignore instead (2023) by frou_dh | 202 | 94 |