Git and empty directories

I’m currently under the process of moving all my workplace repositories from SVN to Git (configured to work with Gerrit). As a side not, I already found it to be a great tool for code review, line-precise commenting of the artifacts and for reviewing new employees code before pushing the changes to the repository. But, back to my point. Recently I’ve stumbled upon a problem with committing an empty directory in Git. If the directory consists of some files and you stage those files, the directory will be committed automatically. However, if the directory is empty, you cannot commit it. ...

April 21, 2012 · 2 min