I've been following the [steps from Atlassian](https://www.atlassian.com/git/migration#!migration-convert) for converting my SVN repositories to Git and then pushing them to BitBucket. Overall the process has been realtively painless. I've already moved loads of SVN to BitBucket, but up to this point the migration has dealt with realtively small and little used projects.
Now I'm trying to convert a more heavily used project, with lots of tags and some active svn branches. None of these repositories use a --stdlayout, so I am defining my layout manuallly. I've tried a few different things, and no matter what I do, `git branch` only every shows me the master branch. None of the other branches are being created.
Most recently, I tried this:
git svn clone --trunk="/MyProject/trunk/MyProjectMobileApp" --branches="/MyProject/branches/ProblemChild --branches="/MyProject/branches/ios7Work" --tags="/MyProject/tags/MobileApp" --tags="/MyProject/tags/released/MobileApp" --authors-file=authors.txt https://user@svn.fq.dn/svn/iOS MyProject
When that finished (almost 24 hours later), I ran
java -Dfile.encoding=utf-8 -jar ~/svn-migration-scripts.jar clean-git
The output indicated that it was going to delete branches from git that did not exist in Subversion:
# Checking for obsolete branches...
svn: warning: W160013: URL 'https://user@svn.fq.dn/svn/iOS/MyProject/branches/ios7Work' non-existent in revision 4448
svn: E200009: Could not list all targets because some targets don't exist
Deleting Git branch 'ios7work' not in Subversion.
Deleted branch ios7work (was f4ee5b6).
Deleting Git branch 'origin/master' not in Subversion.
Deleted branch origin/master (was 241bd27).
Deleting Git branch 'problemchild' not in Subversion.
Deleted branch problemchild (was 0a781d8).
Frustrating. The Problem child branch has been reintegrated back into trunk (in SVN), but it has not been deleted. So it does technically exist in SVN HEAD, but it is effectively dead. We have left it in place because we wanted to review a couple of things in it. The bigger problem in the ios7Work branch. It is alive. It has not been reintegrated, and also exists in SVN HEAD. The thing that is throwing me off is the warning on line 2 of the output above. My HEAD right now is r4447.
I found some documentation that indicated that something may be amiss with my config. So I ran the following:
git config --add svn-remote.ios7work.url https://user@svn.fq.dn/svn/iOS/MyProject/branches/ios7Work
git config --add svn-remote.ios7work.fetch :refs/remotes/ios7work
git svn fetch ios7work
It complained, so I google around a bit, and edited the .git/config to make the ios7work stuff look like this:
[svn-remote "ios7work"]
url = https://user@svn.fq.dn/svn/iOS
path = /MyProject/branches/ios7Work
fetch = :refs/remotes/ios7work
This time the `git svn fetch ios7work` apeared to fetch a bunch of stuff, but when I ran the `clean-git` command from above I got the same output. I have run `clean-git --force`. No matter what I try, the branches are being dropped in git.
Any advice will be greatly appreciated. I've been struggling with this for the better part of 4 days now.