Pushing an existing svn repository to git

梦想与她 提交于 2019-12-20 04:24:52

问题


I'm using SVN and I'm not planning to migrate to Git for now. I'd like to try out AppHarbor but currently you must use Git to deploy code to AppHarbor.

I'd like to continue using SVN but push to AppHarbor's git repository from time to time. Is there an easy way to achieve this?


回答1:


You can create a git clone of your SVN repository with:

git svn clone --stdlayout <URL-OF-YOUR-SVN-REPOSITORY>

... and keep that up to date by periodically running:

git svn rebase

... in the directory created by the git svn clone. You can then push from that git mirror of your Subversion repository to AppHarbor.



来源:https://stackoverflow.com/questions/8078467/pushing-an-existing-svn-repository-to-git

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!