How can I track multiple svn branches in git

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

-------------Problems Reply------------

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.

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

Category:svn Views:3 Time:2009-01-19
Tags: svn git branch

Related post

  • How do I access svn branches using git-svn with a non-standard svn repo layout? 2010-09-09

    The standard repo layout in svn is as follows. /trunk /branches featureX featureY /tags 1.0 2.0 The repository I'm working with is a much flatter structure. trunk featureX featureY Essentially, trunk is at the same level as the other branches. I can'

  • How to switch svn branches using git-svn? 2009-04-08

    Duplicate How do I make git-svn use a particular svn branch as the remote repository? I am using git-svn to track development by someone else on svn. I'm trying to figure out how to use gti-svn to switch from one svn branch to another. All the exampl

  • Tracking upstream svn changes with git-svn and github? 2010-05-08

    How do I track upstream SVN changes using git-svn and github? I used git-svn to convert an SVN repo to git on github: $ git svn clone -s http://svn.osqa.net/svnroot/osqa/ osqa $ cd osqa $ git remote add origin [email protected]:turian/osqa.git $ git pus

  • Delete a svn-Branch via git? 2009-12-03

    I'am using git as scm of choice but have to use a svn-repo. I can create a svn-remote-branch like this: git svn branch the_branch But how can i delete the remote branch? --------------Solutions------------- Currently, it is not possible to delete an

  • How do you stop tracking a remote branch in Git? 2010-06-15

    How do you stop tracking a remote branch in Git? I am asking to stop tracking because in my concrete case, I want to delete the local branch, but not the remote one. Deleting the local one and pushing the deletion to remote will delete the remote bra

  • How do I undo tracking a remote branch in git? 2012-01-24

    I've accidentally unhitched my master branch from tracking origin master I think. It used to be that I could run git pull and git push and it would know that I meant git push origin master but now it does not, and I think it's tracking a different br

  • Git - track multiple remote branches? 2010-12-27

    So let's say there are three developers: Alice, Bob and Cecil. They decide to use Git without a central repo. They all setup remotes to each other, so that: * Alice has remotes/bob/master * Alice has remotes/cecil/master * Bob has remotes/alice/maste

  • Remotely Track the Current Branch in Git 2009-11-23

    I'm moving my continuous testing to a dedicated server (autotest slows down my local laptop too much). What I'd like is for my testing server (which happens to be running CruiseControl.rb) to be continuously getting my latest (committed) changes via

  • Importing an svn branch into git 2009-02-05

    I am new to git, and have a subversion repository that I want to be able to import into a git repository occasionally (for deployment). So I want to perform most of the updates using svn but wanted to see what's the best way to push it to git (just t

  • create a new svn branch with git-svn 2010-03-29

    While working with git-svn, and a 'typical' svn repo /trunk, /branches/..., /tags/... How do I push a local branch to a new branch inside of /branches ? --------------Solutions------------- Say we have a skeleton Subversion repository with empty trun

  • Problem cloning a single SVN Branch via git svn 2010-08-20

    I have tried the following command on my SVN Repository to clone only a single branch via git. git svn clone http://svn.supose.org/supose/branches/B_0.7.1 but got the the following error message: Initialized empty Git repository in /Users/km/workspac

  • Keeping code in multiple SVN repositories with git locally 2012-02-09

    I am working on a project where there are two SVN repositories. One is for external use, and our interfacing with partners on the project, and the other if for purely internal use. I have a folder (src) which exists on the external repository. My des

  • How do I manage multiple development branches in Git? 2010-05-24

    I have 5 branches of one system - let's call them master, London, Birmingham, Manchester and demo. These differ in only a configuration file and each has its own set of graphics files. When I do some development, I create a temp branch from master, c

  • TeamCity Projects and Multiple SVN Branches 2009-05-21

    In the spirit of keeping my SVN trunk clean and ready for deployment, I've been utilizing the following source control model. For the impatient, the basic concept is that you create development branches to do actual development, and leave the trunk c

  • Workflow for multiple SVN branches in IntelliJ IDEA 2012-04-24

    I'd like to easily switch between SVN trunk and one or a few feature branches using IntelliJ IDEA, preferably being able to work on multiple branches concurrently. I have some "local" configuration like database settings for integration tests and deb

  • Working on multiple SVN branches in 1 Eclipse Workspace 2010-10-31

    Is it possible to have 1 workspace which contains different branched copies of the same project? Say I have Project1, and it is in this structure: /trunk/Project1 /branches/1/Project1 /branches/2/Project1 Can I have 3 instances of Project 1 in the sa

  • Clone multiple SVN projects with git-svn 2008-11-10

    I have a large Java app that is split up into multiple projects. Each project has its own folder in a Subversion repository like so: AccountingCore trunk branches tags Common trunk branches tags WebCommon trunk branches tags etc... I want to start us

  • Can you specify which svn branches with git svn? 2009-01-15

    I think my question is somewhat similar to CaptainPicard's but dissimilar enough that I feel compelled to ask so here goes. I have an old SVN repository with around 7500 revisions and part of those 7500 revisions are some pretty large .fla files. And

  • How to integrate svn branches into git branches with git-svn? 2011-03-02

    i have not much svn experience but i am used to work with git. I have the following svn repository structure and revisions. https://server/svn/solution/trunk/solution.sln @r100 https://server/svn/solution/trunk/project1/project1.csproj @r150 https://

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.137 (s). 11 q(s)