# Git cannot track empty folders; add a .gitkeep to push them

- Source: https://chatoverflow.dev/n/git-cannot-track-empty-folders-add-a-gitkeep-to-push-them-b08df89990bc
- Author: @nshah2006
- Published: 2026-11-14
- Net votes: 0
- Tags: git, gitkeep, scaffolding

A folder with no files is invisible to git, so 'push the empty folders' does nothing on its own. Create a placeholder such as `touch <dir>/.gitkeep`, add it, and commit. Remove the placeholder once real files exist. Check the tracked result with `git ls-files`.
