The ideal solution would be to specify trunk: refs / heads / master mapping to configure SubGit , so SubGit will synchronize the trunk with the master, ignoring any other branches.
Unfortunately, SubGit requires at least one branch mapping at the moment (versions 1.0.x and 2.0.x). That is, you need to specify something like this:
trunk = trunk:refs/heads/master branches = branches/*:refs/heads/* shelves = shelves/*:refs/shelves/* tags = tags/*:refs/tags/*
Since you are not going to sync all Git branches, consider using a special namespace to fix the problem:
trunk = trunk:refs/heads/master branches = branches/*:refs/gitsvn/heads/* ...
Thus, if one pushes the main branch into the central Git repository, it is transferred to the trunk. However, if someone clicks on the foo branch, SubGit ignores this branch, as refs / heads / foo goes out of sync.
Merging issues arise: if commit A is the result of merging the foo branch into master, then SubGit creates the / foo branches on the Subversion side for the corresponding commit A. parent. If you prefer not to include the generated SubGit branches in * names / ** namespace, consider also use of some special branches on the Subversion side:
trunk = trunk:refs/heads/master branches = gitsvn/branches/*:refs/gitsvn/heads/* shelves = shelves/*:refs/shelves/* tags = gitsvn/tags/*:refs/gitsvn/tags/*
In this case, the same parent element commit A should be sent to the gitsvn / branch / foo branch.
This is the best solution available at the moment. We also have a feature request for version 2.1, which will allow you to choose the perfect solution, but it will take some time before we implement it.
Update on SubGit 3.0:
Starting with version 3.0.0 (the early access phase is currently uploaded to http://subgit.com/eap ) SubGit supports the layout of one branch, so the configuration file may look like this:
No trunk, no branches, no tags and shelves:
[svn] url = http:
In this case, the project directory is displayed directly in the master branch in the Git repository; SubGit ignores any other branches and never creates shelves, which means that anonymous Git branches are not synchronized with SVN.
Separate trunk, shelves:
[svn] url = http:
In this case, the project / trunk directory maps to the master branch in the Git repository; SubGit ignores any other branches and never creates shelves.
Separate trunk with shelves:
[svn] url = http://host.com/repos/project trunk = trunk:refs/heads/master shelves = shelves/*:refs/shelves/*
In this case, the project / trunk directory maps to the master branch in the Git repository; SubGit ignores any other branches, but transfers anonymous branches to the default shelves for versions 1.0.x and 2.0.x.
Hope this helps.