Moving from svn to git
November 12, 2013
After nearly two years of tinkering with git, it’s time to pull the plug on my subversion setup. It’s taking too long to push changes because the repos are getting unwieldy. Git works great with the same amount of data, and much quicker to push changes to and from repositories.
# cd staging
# git svn init https://svn.domain.tld/reponame/path/ –stdlayout
Now, check out what config git built for you…
And populate it…
That make take some time to build your setup.
Once complete, check out the branches and then make them local instead of remote…
# cp -Rf .git/refs/remotes/* .git/refs/heads/
# rm -Rf .git/refs/remotes
# git branch -a
On your server, create a bare repo
# cd /var/git/project.git/
# git –bare init
Add it on the local repo and push everything to it.
# git push –all origin
Once complete without errors, you can check your favourite branch out again somewhere else, or use your staging area.