There is any way to synchronize GIT and Subversion repositories?

后端 未结 7 552
花落未央
花落未央 2020-12-23 10:17

I want to access a repository using both GIT and SVN clients. A way I imagined to do that is through automatic two-way migration: when a user PUSHes into the GIT repository,

7条回答
  •  悲哀的现实
    2020-12-23 10:46

    Our team had exactly the same problem and after a bit of experimentation we managed to come up with a git-Subversion bridge that synchronizes changes between our team git repository and the corporate Subversion repository. Our git usage is transparent to other Subversion users.

    The setup is described in more detail at https://github.com/mrts/git-svn-bridge.

    We have used this setup in production for more than a year.

    I guess the biggest caveat of the setup is that the git repository tracks only SVN trunk (or another single branch), thus other git branches will be squashed into one commit during merge to trunk. For us this is no problem - we use short-lived task branches and consider them to be lightweight, ephemeral "units of work" that can go to mainline in a single chunk - and the branch history is retained in git.

提交回复
热议问题