I have a previously working SVN-Mirror using the default mapping which maps TRUNK to master. On the svn side branches are not used and on the git side branches are used for development lifecycle management (i.e. develop->release->master<->hotfix). It's not likely the svn project is going to restructure their repository. How can I at lease change the mapping to be svn.TRUNK<->git.develop? I would like to keep development commits off of the master branch since we use that for production commits.
Hello Dennis,
It is impossible to change branch mappings for established Git-SVN mirror, so you have to start with an empty Git repository and re-import your Subversion repository with proper settings.
Please specify the following values in order to map 'trunk' to 'develop' branch in Git repository:
url = <SVN_URL>
trunk = trunk:refs/heads/develop
branches = branches/*:refs/heads/*
shelves = shelves/*:refs/shelves/*
tags = tags/*:refs/tags/*
Note that you can map certain branches explicitly, e.g.:
branches = branches/stable:refs/heads/master; branches/*:refs/heads/*
Another thing I'd like to mention is that although you don't use branches on Subversion side, I'd still recommend to keep them synchronized with Git. By design SubGit plugin synchronizes every single branch found in Git repository. If some Git branch doesn't have configured mapping, then the plugin automatically sends that branch to shelves/<auto_generated_branch_name>. So, it's better to specify all the existing branch mappings to avoid those auto-generated shelf-branches.
Hope that helps,
Semyon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.