Move Project from Subversion To Git Without History

Today I had a couple of projects that I wanted to move from a subversion repository to a Git repository (since I find it easier for branching). Since I will still have the subversion server around, I wan’t really interested in all the extra work needed to transfer all the subversion history. Here is how you can quickly switch a project from subversion to git:

1. Go to the project directory

cd /home/username/myproject/

2. Remove the .svn files

find . -name .svn -exec rm -rf {} \;

3. Create git repository

git init

4. Commit your files

git add -A && git commit

And thats it: the quick and easy way to move a project (if you don’t care about your history). It’s worth noting that if you are using an IDE the process may be more complicated. For Netbeans 7.3 all I had to do was close the project, and restart the IDE, but I can’t vouch for anything :)

This entry was posted in Uncategorized and tagged , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>