git and svn: add another branch

July 10, 2008 – 4:12 pm

If you use git as your software project workhorse and yet have to track remote svn repo, then you might be interested.

Today I had to add tracking of another svn branch.

Git branches are essentially no-op. Svn are not that good, but nevertheless…

But git clone of yet-another-svn-branch (in the existing repo) appeared to be an issue.

Thanks to dmo.ca, this was finally done.

In short, you have to add another svn-remote to your .git/config:

[svn-remote "additional-svn"]
    url = svn+ssh://your-server/home/svn/project-name/trunk
    fetch = :refs/remotes/git-svn

and then fetch the revision that is on the branch of interest (that’s important):

git-svn fetch additional-svn  -r MMMM

After it completes, you may check your branches with

git branch -r
blog comments powered by Disqus
192.168.1.1Linksys Router SetupLinksys Default Password
192.168.1.1
192.168.1.1
MP4
192.168.1.1
192.168.1.1
Linksys Router
192 168 1 1
flush dns
MP4
MP4
Linksys Router Setup
spdif
192.168.1.1
192.168.1.1
Linksys Router
0x80070005 error