Git only branches with svn mirror

30 views
Skip to first unread message

Angelo Diego Crabolu

unread,
Feb 28, 2018, 10:36:19 AM2/28/18
to SubGit Users
I set up subgit to mirror an svn repo, I would like now to be able to create git only branches and share them among git users without pushing them on the svn server, when done I will rebase the branches on trunk and push them to svn.
Is this possible? I tried adding an excludeBranches = branches/GITONLY-* and name the git branches GITONLY-something but that didn't work.

Best regards,
Angelo Diego Crabolu

TMate Software Support

unread,
Feb 28, 2018, 11:47:01 AM2/28/18
to Angelo Diego Crabolu, SubGit Users
Hello, Angelo

yes, it's possible and you're right, it should be set by using the 'excludeBranches' option in the way you've described,
but this option has to be set prior to initial translation. If you want to add this configuration to running mirror,
then you need to re-translate the repository by the command:

subgit install --rebuild <GIT_REPO>

Note, that this command will change commits hashes in the repository.
If nevertheless it doesn't work as expected even after that, then there might some configuration issue exist
could you please let me know your mapping configuration
or provide daemon log (GIT_REPO/subgit/logs/daemon.0.log) for analysis,
I'll try to find out what causes the issue and how to resolve it.

-------
with best regards,
Ildar Khusainov,
TMate Software,
http://tmatesoft.com/ git-svn import & mirror

--
You received this message because you are subscribed to the Google Groups "SubGit Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subgit-users+unsubscribe@googlegroups.com.
To post to this group, send email to subgit...@googlegroups.com.
Visit this group at https://groups.google.com/group/subgit-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/subgit-users/a7493ba4-e4da-40a5-b3e4-51d2ef5ad31b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

TMate Software Support

unread,
Mar 1, 2018, 10:58:10 AM3/1/18
to Angelo Diego Crabolu, SubGit Users
Hello, Angelo

I have to correct my previous answer: if the branch you mention in "excludeBranch" 
hasn't present before in SVN or in Git, then the 'rebuild' option is not needed, run

subgit install <GIT_REPO>

Sorry for that I didn't mention it yesterday.

Also, I'd like to add that there is a way to use Git-only branches without even touching mapping:
you can place git-only branches to a separate namespace in git, that isn't present in mapping
and those branches will become git-only. For example, create a branch in a 'gitonly' namespace:

git checkout -b gitonly/<branch name>

Thus new branches will be in 'gitonly' that isn't being translated to SVN.

Hope it will help.

-------
with best regards,
Ildar Khusainov,
TMate Software,
http://tmatesoft.com/ git-svn import & mirror

Reply all
Reply to author
Forward
0 new messages