Search code examples
gitgit-svnmultiple-repositories

Can one git repository track subversion and git remotes?


I am going to set up extra repositories for our partners, while our official repository is svn, I am free to pick the repositories for our partners.

My idea is to clone our repo with git-svn(let's call this repo1), create git repositories for our partners and track partner repositories with repo1. Is this possible without making git-svn confused?


Solution

  • What you're suggesting is unsupported out-of-the-box with git-svn. The core code considers git-svn to be a git-like svn client, but not a full blown git repository environment. Here's an excerpt from Pro Git, a free online manual with great details on git-svn:

    Don’t set up and collaborate on a separate Git server. Possibly have one to speed up clones for new developers, but don’t push anything to it that doesn’t have a git-svn-id entry. You may even want to add a pre-receive hook that checks each commit message for a git-svn-id and rejects pushes that contain commits without it.

    Reason has to do with how git-svn assigns git-svn-id's. For your use case I would try Subgit. Allows full integration between a git repository network and a legacy SVN repo.