Pushing an existing svn repository to git

2019-03-03 04:30发布

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条回答
趁早两清
2楼-- · 2019-03-03 05:30

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.

查看更多
登录 后发表回答