You want to switch from Subversion to GitHub without missing an accurate SVN history? The GitHub importer does not suit you? There is a remedy: Your repository is migrated without information loss in a few steps – thanks to SubGit!
- Download SubGit and ensure you have also Java as well as Git installed.
- Unzip the archive, open a console and navigate into the "bin" subfolder.
- Type in the console and replace
[SVN_URL]
with the URL to your SVN repository andmeinGitRepo
by the name of the targeted Git repository:subgit configure [SVN_URL] ./meinGitRepo
- Open the
authors.txt
and adjust the user information. Example:meinSvnNutzer = meinGitNutzer <123456789+meinGitNutzer@users.noreply.github.com>
If needed also adjust thepasswd
accordingly. - Now initiate the actual import by the following console command (replace
meinGitRepo
just like before):subgit import ./meinGitRepo
- As soon as the import has finished, change to the new set up directory via console:
cd meinGitRepo
- Next type in
git remote add github https://github.com/meinGitNutzer/meinGitRepo
and replacemeinGitNutzer/meinGitRepo
with the corresponding coordinates of your new Git repository at GitHub - Afterwards enter
git push github --all --follow-tags
- As a last step type in now
git push github --tags
That's it! Your SVN repository should now be findable as a complete counterpart at GitHub!