From my experience, git-svn does not work with Git submodules, mainly because of the way you submit changes to SVN: if you debug it a bit, you will find that it sends delta to SVN (therefore, pure Git concepts like submodule are not translated ), then it retrieves the just sent revision back (therefore, this revision does not contain submodules) and after all replaces the just sent commit with the extracted version (so that the submodule will be lost in this process at best, although in my experience this just does not work before). So if you can just have an unlit Project y Submodule directory and manage it manually, rather than as a submodule.
Alternatively, you can try SubGit as a replacement for git-svn. Starting with 2.0 EAP, it allows you to create a Git mirror for the remote SVN repository.
$ subgit configure --svn-url http://svnhost/svnpath/projectX projectX.git $ #adjust projectX.git/subgit/{config,authors.txt,passwd} and, if possible, enable rev-propchange-hook in SVN repository $ subgit install projectX.git
After that, you can clone projectX.git and work with it, as in a regular Git repository, synchronization will be performed automatically. Therefore, after installation, you add Project y Submodule as a regular Git submodule of project X.git.
$ git submodule add git://github.com/.../projectY.git projectY $ git commit -m "Added projectY as submodule" $ git push
The only thing you need to do is make sure that there is no file or directory with the same name in SVN or that it will not overwrite the submodule.
source share