tags:

views:

400

answers:

2

There are so many ways to skin a cat, can anyone improve on this?

+4  A: 

a neat article which helped me ever so much http://www.jukie.net/~bart/blog/svn-branches-in-git hope it is useful.

Setori
+5  A: 

That's a great article, but what really helped me was to understand the config for git svn.

Assuming your SVN is setup like:

$SVN_ROOT/project/trunk
$SVN_ROOT/project/branches
$SVN_ROOT/project/tags

your .git/config looks like this:

[svn-remote "svn"]
    url = $SVN_ROOT
    fetch = project/trunk:refs/remotes/git-svn
    branches = project/branches/*:refs/remotes/*
    tags = project/tags/*:refs/remotes/tags/*

then a git branch -r will list all the remote branches. The "project/branches/*" says that anything on SVN in the branches dir is mapped to a remote branch.

git checkout $branch will check it out, but what you really want to do is git checkout -b my_feature $branch and work your local branch (rooted at the remote branch), and then merge in when you are done.

davetron5000
Hi Dave, your last paragraph; I dont fully understand, could you please elaborate further.
Setori