Using git with an svn repository

Just like you can use bazaar with an svn repository you can also use git.

git svn clone url [base]

and you’re good to go.

If you want it in the directory you’re currently in use . as base. If you don’t specify a base, a folder will be created.

Git, unlike bazaar, will still work with with a local copy/repository, so a commit will only commit it locally.

(Bzr can also do this. The easy/default way however will use the centralized system.)

The svn upgrade equivalent is now:

git svn rebase

And when you’re read to commit:

git svn dcommit

As git and svn ignores differ, add the svn ignores to your git:

git svn show-ignore >> .git/info/exclude

As there’s no real console executables for windows for svn, this is a very good alternative. Especially if you’re using or already have git anyway.

And if you already used a distributed version control system, who would want to miss local commits? 🙂


Damn… This whole story failed on the repository I just wanted to check out…

Back to bazaar!

Oh, it was because there were several projects and branches on that url.

Directly cloning a trunk (found it via web-view) works.

Bzr however did also clone the complete repository.

Ok, I still fail…

Fail at getting the files in my git local repo into my filesystem… 🙁