I am using git with an svn repository everything is going fine I did all my branching with git so I did not branch on svn but I branched with git and pushed those branches to a separate location. Then I commited changes from the branch when needed.
But now I want to create some branches that actually exist on svn I tried:
$ git svn branch someFeature -m "message"
,and I got this:
$ git svn branch someFeature -m "message" Multiple branch paths defined for Subversion repository. You must specify where you want to create the branch with the --destination argument.
How should I specify the destination I can't figure this out and the man page isn't that clear also.
Subversion Branching StrategiesSubversion branches (SVN branches) allow your team to work on multiple versions of your code simultaneously. Developers can test out new features without impacting the rest of development with errors and bugs. SVN's “branch” directory runs parallel to the “trunk” directory.
SVN has a Centralized Model. In git every user has their own copy of code on their local like their own branch. In SVN there is central repository has working copy that also make changes and committed in central repository. In git we do not required any Network to perform git operation.
git-svn is a specialized tool for Git users to interact with Git repositories. It works by providing a Git frontend to an SVN backend. With git-svn, you use Git commands on the local repository, so it's just like using normal Git. However, behind the scenes, the relevant SVN commands are sent to the server.
You have multiple (or no) directories from svn marked as place for branches. Look into you .git/config file, there would be section like that:
[svn-remote "svn"] url = file:///someurlto/svn fetch = trunk:refs/remotes/trunk branches = branches/*:refs/remotes/* branches = branches2/*:refs/remotes/*
There will be multiple entries for branches. (Alternately, if you don't have any branch entries, the first line should work with a standard SVN repo layout.)
So, when branching you must point in which directory the branch should be created:
git svn branch someFeature -m "test" --destination branches2
where the last element is one of the directories from branches lines in .git/config.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With