Tuesday, May 22, 2012

Track empty directories whit GIT

According to the GIT FAQ, there is currently no way of adding a empty directory to a GIT repository. But there are workarounds whit placing a dummy file in it and ad this file to the repository. I don't like dummy files, so this is the best solution for me:

Put a file .gitignore in every directory which should be empty. If all other Files in this directory should be ignored add this two lines to the file:


This is specially helpful to add directories which can contain temporary date (eg. tmp dirs).