Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
210 views
in Technique[技术] by (71.8m points)

Possible to migrate an SVN repo to git that is a local copy only?

I have a clone of an SVN repo on my machine for which the SVN server is unreachable. The program used for cloning is Tortoise SVN for Windows.

Is there any way to import the commit history of the repo into a git repository on github?

I tried

svnadmin dump repo/.svn > svn.dump

Resulting in

svnadmin: E165005: Expected repository format '3' or '5'; found format '12'

Which seems to be misleading, meaning I cannot dump that copy. But are there options other than dumping?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I suspect now this is impossible. Local SVN checkout doesn't contain enough information to serve as a repository. There is no history information — it's all on the server.

Your only way is to simply remove .svn subdirectories and run git init && git add . to create a repository with your files. No history.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...