As mentioned in this question (and in the Git FAQ), you can't store empty directories in Git.
I have a git-svn
clone, and I want to use Git in it to work against my project's Subversion repository.
The problem is that there are some empty directories that are stored under Subversion and are necessary for compiling the project.
So far, I've been doing what was suggested in the FAQ: I added a .gitignore
file in each directory that should stay empty, and committed that addition to Git, so whenever I clone from this git-svn
repository, I get all the empty directories and I can compile.
The minor trouble is that whenever I want to git svn dcommit
back to the Subversion repository, I need to do that from a separate Git branch without the commit in which all the .gitignore
files were added, so that they don't get added to Subversion as well.
But I thought about it, and it might not be that bad - so my questions is, is there any reason why I should not commit the addition of the .gitignore
files for each empty directory to Subversion?