开发者

Export Entire Git Repo to SVN including Branches

开发者 https://www.devze.com 2023-01-21 18:06 出处:网络
Long story short, I have a git repo with several branches, and I would like to move it to an SVN repo while maintaining all of the branches and commit history.

Long story short, I have a git repo with several branches, and I would like to move it to an SVN repo while maintaining all of the branches and commit history.

So far I have not had much luck, most of the methods I have found do not migrate the branches as I would expect. (they are combined, or ignored, or eaten by a grue)

I was planning on using git-svn (git locally, SVN remote) and from the documentation I got the impression that using Git with SVN in this manner was very possible.. . but no idiot proof tutorial was provided!

Is t开发者_JAVA百科his possible? if so how? If not what is it about git/svn do I not understand?


Did you check git2svn as detailed in question "Cloning a Non-Standard Svn Repository with Git-Svn"?
It could help for this kind of conversion.


I would not recommend pushing your git branches to a svn repo. When using git-svn, its typical that the git repo is a throwaway piece that helps to keep the svn repo clean and merge friendly.

The best practice, as I have found, is to merge your git branches and git svn dcommit just that branch to a checked out repository branch (don't checkout the entire svn repo). Then again, you can create a svn branch as your scratch branch for this and do a manual merge from that branch to another in svn.

0

精彩评论

暂无评论...
验证码 换一张
取 消