How do we use the git svn clone to create multiple directories as branches and retain the branch name as is.
Here is the current svn structure
- svn/url/projectrootfolder/code
- Subfolder1
- Subfolder2
- svn/url/projectrootfolder/code_1
- svn/url/projectrootfolder/code_2
- svn/url/projectrootfolder/code_3
Run the following command with branches parameter (ignore code_2 and code_3)
echo svnpassword | git svn clone "svn/url/projectrootfolder" --trunk=code --branches=code_1 --no-metadata --authors-file="authors.txt" --prefix="svn/" --preserve-empty-dirs --placeholder-filename=.gitkeep --username svnreader ProjectLocalFolder
Check branch status
git branch -a
shows
* Master
remotes/svn/Subfolder1
remotes/svn/Subfolder2
remotes/svn/trunk
I have only about a weeks worth experience with git and I assumed that the comamnd would create local branch code_1. But I don't see code_1 anywhere and the subfolders within the main project folder as branches. All the documentations I read seemed to indicate that git svn clone would achieve the desired result.