Git SVN On Windows

At work we use svn and lately I’ve been trying git svn to maintain a local git repository that I can push to the svn server. So far, I love it! The best feature is being able to use git stash to “stash away” the current dirty workspace, work on something (say a defect), commit and then call git stash pop to return to what I was working on.

Setup is quite easy… on windows, you need to install Cygwin and under devel package select git and git-svn.

Once it’s installed, just follow the following steps to get started:

  1. git svn init http://path/to/svn/project/trunk projectname
  2. cd projectname
  3. git svn fetch -rREVISION (most likely this will be git svn fetch -rHEAD
  4. git svn rebase

That’s it… all the usual git commands will work, and when you’re ready to commit just type git svn dcommit

My only worry is that I have yet to have a conflict, and I’m afraid I’ll be hosed without my usual eclipse conflict compare. :)

You can leave a response, or trackback from your own site.

Facebook comments:

3 Responses to “Git SVN On Windows”

  1. Mark says:

    I’ve wanted to try the same thing, but I would need to git svn to an SVN bridge to TFS. That feels like too much of a work around.

  2. I’ve been using git svn on windows as well. I found that msysGit (link on git’s site) worked better for me – for some reason cygwin + git just didn’t work very fast.

    You can actually use git difftool or git mergetool to launch almost any diff or merging tool. You just need to configure it.

    btw, your captcha check cleared my comment when I got it wrong :/ Luckily “back” still had it.

  3. [...] I have  set  up a  Cygwin with a git client. In the beginning it seamed to be very easy – here is a short description how to do it. However after I successfully placed (checkout) my project using git-svn, I started to have [...]

Leave a Reply

Subscribe to RSS Feed Follow me on Twitter!