I read the Git manual, FAQ, Git - SVN crash course, etc. and they all explain this and that, but nowhere can you find a simple instruction like:
SVN repository in: <
There are different methods to achieve this goal. I've tried some of them and found really working one with just git and svn installed on Windows OS.
Prerequisites:
svnadmin dump /path/to/repository > repo_name.svn_dump
Steps to achieve final goal (move all repository with history to a git, firstly local git, then remote)
Create empty repository (using console tools or tortoiseSVN) in directory REPO_NAME_FOLDER
cd REPO_NAME_PARENT_FOLDER
, put dumpfile.dump into REPO_NAME_PARENT_FOLDER
svnadmin load REPO_NAME_FOLDER < dumpfile.dump
Wait for this operation, it may be long
This command is silent, so open second cmd window : svnserve -d -R --root REPO_NAME_FOLDER
Why not just use file:///...... ? Cause next command will fail with Unable to open ... to URL:
, thanks to the answer https://stackoverflow.com/a/6300968/4953065
Create new folder SOURCE_GIT_FOLDER
cd SOURCE_GIT_FOLDER
Finally, what do we got?
Lets check our Local repository :
git log
See your previous commits? If yes - okay
So now you have fully functional local git repository with your sources and old svn history. Now, if you want to move it to some server, use the following commands :
git remote add origin https://fullurlpathtoyourrepo/reponame.git
git push -u origin --all # pushes up the repo and its refs for the first time
git push -u origin --tags # pushes up any tags
In my case, I've dont need tags command cause my repo dont have tags.
Good luck!