简体   繁体   中英

Pushing from git into a subversion repository

I have my work in a git repository, some of my coworkers want to incorporate it into their subversion repository. I'm going to keep working with git, but it would be nice have a subversion repo as a remote that I can push to once in a while.

I don't plan on pulling from it ever. If this is doable, we'll have an understanding that the subversion remote is write-only from my point of view and read-only from theirs. They already have access to the git repo, and will be working there anyway (yes, it's a bit ridiculous, but I cannot change that).

Is this something that git-svn can handle?

Yes. If you use git-svn to set up the SVN remote, you can subsequently use dcommit to push changes to it at will, indefinitely. If you want to enforce the workflow that only you can push to the SVN repo, that can be achieved using Subversion's access control mechanism; eg, see How to setup access control in SVN? .

Since by default dcommit rebases the Git branch you're updating SVN from, you should consider maintaining a local branch for the purpose of publishing changes to SVN. The simplest case would be if the SVN repository need only receive commits from master and not attempt to track merges.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM