Goodbye Forever SVN!

I actually can't remember the last time I used Subversion (SVN) but I had a couple old websites under checked into a Subversion repository that I've been meaning to get into Git. We run our own GitLab install where I store all my code and such, but for some reason I left out some older projects. Probably because I was lazy.

Unfortunately it appears Subversion doesn't keep a single .svn folder to manage the versioning of your project, but appears to keep an .svn folder for each directory within your project. Importing all that into a new Git repository would be silly. Fortunately for us *nix folks there's an easy way to get rid of them!

find . -type d -name .svn -exec rm -rfv {} \;

For those unsure about this command, it essentially finds all directories named .svn and then removes them. I recommend running this in the root of your SVN repository. You can also take a quick backup of your Subversion repository as well, just in case anything goes wrong. Once it's done running you should have a folder with all your sites/repository files without those pesky .svn folders! 👍


comments powered by Disqus

Morgan W.

Head over heels for gadgets!

Search



Instagram

Twitter