There’s a lot of information describing how to migrate from Subversion to GIT, but very little which describes the process under Windows. In particular most references assume that you can reference the Subversion repository using file:// which is currently not the case. You need to access the Subversion repository using the svn:// protocol.

The instructions below assume you’re using TortoiseSVN, but the process should be basically the same if you are not.


Assuming you already have GIT installed:



SVN_USERNAME = GIT_USERNAME \[user_email_address\]


git svn clone "\[svn-repository-url\]" -A \[path-to\]users.txt -t tags -T trunk --no-metadata "\[path-to-git-directory\]"

 



git reset --hard
copy .git\\refs\\remotes\\tags\\. .git\\refs\\tagsdel /q .git\\refs\\remotes\\tagscopy .git\\refs\\remotes\\ .git\\refs\\headsdel /q .git\\refs\\remotes
rd .git\\refs\\remotes\\tags

If things worked you should have a hidden .git directory in the GIT directory you created. If you’re using TortoiseGIT, right-click on your project directory, and select “TortoiseGIT->Show Log”.

The last step I usually do is to push the GIT repository to GitHub. Create a new repository on GitHub, and then:



git remote add \[alias-to-github\] \[url-to-git-hub-repository\]

 



git tag \[version-number\]
git push github \[version-number\]:refs/heads/master --tags --force