Import SVN repository to Git

Apr 5, 2012 by

To import an SVN repository into git, you can use the git svn command.

If you want to just import your SVN repository into Git as is, you can run the following sequence of commands:


$ git svn clone SVN_REPO_URL LOCAL_DIR
$ cd LOCAL_DIR
$ git remote add origin git@example.com:USER_NAME/REPO_NAME.git
$ git push origin master

If you repository is setup in a standard way and you want the git svn command to be smart about it, you should add the -s flag to the first command:


$ git svn clone -s SVN_REPO_URL LOCAL_DIR
$ cd LOCAL_DIR
$ git remote add origin git@example.com:USER_NAME/REPO_NAME.git
$ git push origin master

Which basically says to git svn that your repository is in a standard layout.

read more

Eclipse marking SVN changes like Netbeans

Dec 9, 2011 by

Eclipse is a great tool that I have been using for mmm… wow (!!!) probably about 7 years now and the most amazing thing about it is of course all the plugins that can really extend the functionality of the basic editor and make it highly personalized. This is great, but some things should just be in a good IDE. Like built in SVN integration. Seriously, why do I need to install a plugin for something so basic? Netbeans is another great IDE, but I use it less as most my development environments come from dedicated Eclipse plugins and while it is possible to do the development in Netbeans it is not as convenient and straightforward and this is what we the pragmatic programmers usually prefer.

So one nice thing I got used to in Netbeans is how it colors the changes that I made in the editor if the file is under version control (e.g. SVN). After I used Netbeans for a while and got to like this feature, when I got back to Eclipse I kinda missed it. It’s nice and convenient. Quite non obtrusive i.e. it doesn’t get in your way – you may not even be noticing this if you don’t know about it.

Anyways, turns out that it is quite easy to enable similar functionality for Eclipse, alas you have to have SVN plugin I suppose for the “diff” to work. Just follow the screenshot if you want to enable coloring of SVN changes in Eclipse similar to Netbeans.

Here’s how it will look (you can change colors if you want)

read more

Related Posts

Tags

Share This