I've got a SVN repo I'm converting to git (I'm being dragged, kicking and screaming, into the 21st Century...!)
I'm following the instructions at https://john.albin.net/git/convert-subversion-to-git, but realise they're pretty old, and I don't know how much git has changed recently.
The instruction in Section 5 is
git branch -m trunk master
but I only have origin/trunk
, so running this command returns
$ git branch -m trunk master
error: refname refs/heads/trunk not found
fatal: Branch rename failed
Has git changed how it refers to the master branch since these instructions were written?
I'm also trying to work out if I actually need to do step 4? Can I push the result of Step 3 straight into a new github repo that I've created?
more info
In fact, all of my branches (apart from master) are prepended with origin
:
svn2gitdir $ git branch -a
* master
origin/add-pictures
origin/fix-forms
From what I understand about git, this means it thinks they're remote?
If I set up a brand new local blank git repo, and add a branch, then they are truly local:
gittestdir$ git branch -a
master
* mnb
I've used the following command to convert svn branches to git branches:
for b in $(git for-each-ref --format='%(refname:short)' refs/remotes); do git branch $b refs/remotes/$b && git branch -D -r $b; done
Is this a problem? What does it mean?