Jessica Temporal · Jun 25, 2026
the .gitkeep trick: how to make git track empty folders
0Sign in to vote or save
This site does not allow itself to be embedded. You can still read it on the original site — the toolbar below keeps your place in the directory.
You build the thing, you push the project to GitHub, but when your friend clones it and tries to build, it doesn’t work because a folder you needed is missing. Does that sound familiar? 😅 This happened to me too. But here’s the catch: it’s not on GitHub, it’s on git. Git doesn’t track empty folders. So when you were making your commits, git didn’t actually capture that empty folder in your file…
Comments
Nothing yet. Say the first thing.
Sign in to join the conversation.