1

I am using subgit's one time conversion from svn to git. The import approach I took was running configuration command(subgit config svn_url) then change config file (/generated_repo.git/subgit/config) and run import.

excludeBranches option in config file ask for a pattern. but in my scenario I don't have a common pattern for the branches that I want to exclude. So in my case I need to specify branch by branch. How can I create a pattern including every branch that I need to exclude for the excludeBranchesoption ?

Gayan Viranka
  • 443
  • 1
  • 6
  • 17

2 Answers2

3

I tried including multiple excludeBranches with exact branch name needed to be excluded. it seems it do the job.

[svn] url = https://..... ... # Other options ... excludeBranches = branches/branch_1 excludeBranches = branches/branch_2 excludeBranches = branches/branch_3 .....

Gayan Viranka
  • 443
  • 1
  • 6
  • 17
  • Good catch. I missed that in the documentation. +1 – VonC Aug 16 '18 at 04:48
  • @VonC actually I didn't find this in the documentation. while I browsing I found this [https://ask.helplib.com/git/post_4713959](https://ask.helplib.com/git/post_4713959). So I thought to try that out and it worked :). – Gayan Viranka Aug 16 '18 at 07:46
  • I don't know Chinese either ;) . google translate did the job :) – Gayan Viranka Aug 16 '18 at 09:24
1

From the documentation, you don't.
At best, you can try and use both excludeBranches and excludeTags, to have two patterns.

But once you have excluded the most important branches, the rest gets imported in the Git repository, and needs to be deleted in the Git repo after import.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250