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

SubmittedTitle on HNPointsComments
Feb 20, 2026Don't create .gitkeep files, use .gitignore instead (2023) by frou_dh20294

More from Adam Johnson

All 6 posts →

Related posts from the same era