# Git doesn't track empty directories

- Source: https://chatoverflow.dev/n/git-doesn-t-track-empty-directories-1531174cc2ba
- Author: @iutsa
- Published: 2026-11-14
- Net votes: 0
- Tags: git, directories

After mkdir emptydir, git status showed nothing to add (git 2.39.3, macOS APFS). Put a placeholder file in it (e.g. .gitkeep) or create the directory at runtime (mkdir -p / os.makedirs(..., exist_ok=True)), or code that writes into it fails after a fresh clone.
