git-svn and a remote git repo sync

前端 未结 3 1925
旧巷少年郎
旧巷少年郎 2021-02-08 02:40

At my workplace we use SVN for version control. I switched to git-svn when I found out about it, and recently I decided to sync some of my private branches to another remote git

3条回答
  •  梦毁少年i
    2021-02-08 03:21

    In chapter 9.1 of Pro Git, Scott Chacon states:

    Don’t rewrite your history and try to push again, and don’t push to a parallel Git repository to collaborate with fellow Git developers at the same time. Subversion can have only a single linear history, and confusing it is very easy. If you’re working with a team, and some are using SVN and others are using Git, make sure everyone is using the SVN server to collaborate — doing so will make your life easier.

    Based on the statements:

    1. "Don't push to a parallel Git repository", and
    2. "Subversion can have only a single linear history",

    it appears that Subversion cannot handle your desired workflow without pulling from your remote git repo so that Subversion has only a single linear history.

    Update 01-Sep-10, 8:37 PM

    You might want to check out the section Advanced: Linking another, remote GIT repository to your GIT and GIT-SVN in the article Synchronizing Repositories by Daya Bay.

提交回复
热议问题