How to exclude multiple branches in subgit when there is no same pattern

216 Views Asked by At

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 ?

2

There are 2 best solutions below

3
On BEST ANSWER

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 .....

0
On

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.