SVN to Git migration

if you are experiencing following error while doing checkout by following “Migrate to Git from SVN“:

fatal: Cannot setup tracking information; starting point 'origin/???/*' is not a branch.

The reason of the error is during migration, your origin remote was set against local file URL, which is invalid remote URL technically speaking.
You could try to put following into a bash script and execute it in the converted git directory by manually checkout them without tracking:

for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master`; do
    #git branch ${branch##*/} $branch
   git branch ${branch#*remotes/origin/} $branch

Leave a Reply

Your email address will not be published. Required fields are marked *