Subgit: avoid to synchronize git branches onto svn

て烟熏妆下的殇ゞ 提交于 2019-12-03 21:29:18
Dmitry Pavlenko

SubGit synchronizes only branches you've specified in the SubGit config file. By default they are:

    trunk = trunk:refs/heads/master
    branches = branches/*:refs/heads/*
    shelves = shelves/*:refs/shelves/*
    tags = tags/*:refs/tags/*

So if you use another namespace, e.g. refs/heads/nosync/*, branches in it won't be synchronized.

Or you can use refs/heads/* for normal branches (that are out of synchronization) and setup special refs/heads/sync/* namespace for synchronization:

    trunk = trunk:refs/heads/sync/master
    branches = branches/*:refs/heads/sync/*
    shelves = shelves/*:refs/shelves/*
    tags = tags/*:refs/tags/sync/*

Note, that long branch names (like refs/heads/sync/master) don't lead to inconvenience because after cloning such Git repository, you can assign your own local refs/heads/* branches with short names to track branches with long names from one or another namespace. That's why I think this is a good solution for you.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!