Konstantin Sorokin
Konstantin Sorokin

Reputation: 117

How to mirror trunk of svn repo into github?

What is the best way to mirror trunk of some external svn repo into github? I don't intend to make any commits to that project, just want to keep everything needed in one place.

Upvotes: 4

Views: 587

Answers (2)

Lucas Holt
Lucas Holt

Reputation: 3826

There is a handy migration script for doing this called sync2git

When you use rebase, you must tell it to fetch all.

git svn rebase \
--fetch-all \
-A "${AUTHORS_FILE}"

Then it's a matter of tagging the references and creating branches. See the script for a better example.

Upvotes: 0

topek
topek

Reputation: 18979

I think this should work

git svn clone -T trunk https://SVN_REPO
git remote add github GITHUB_REPO
git push github master

after this initial step you can do

git svn rebase
git push github master

Upvotes: 3

Related Questions