Skip to content

Instantly share code, notes, and snippets.

@phackwer
Last active August 12, 2016 22:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phackwer/2863250d15b41e8a5a1873a0b88e39e3 to your computer and use it in GitHub Desktop.
Save phackwer/2863250d15b41e8a5a1873a0b88e39e3 to your computer and use it in GitHub Desktop.
Those are the required commands to import a SVN project into a Git repository
##################################################################################
# clone svn into a local git repository and goes into it
git svn clone https://127.0.0.1/svn/testes/trunk git_svn
cd git_svn
# Map the destiny git repository as origin and pull from it
git remote add origin http://gitlab.com/user/git-project
git pull origin master
# Adds the SVN commits history. Remove it if you don't care about it
git svn rebase
# Sends SVN code to git
git svn dcommit
##################################################################################
Now you can throw away your old SVN repository
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment