SVN to Git Migration. How to migrate a non standard SVN layout to Git


I am currently working on migrating an svn source controlled project into Git (BitBucket). I have followed the guide by Atlassian and nearly got to the end but encountered the following error when running the command git push -u origin --all:

No refs in common and none specified; doing nothing.
Perhaps you should specify a branch such as 'master'.
Everything up-to-date.

I believe this is because the SVN layout is not the standard layout. I have had to specify the trunk, branches and tags like so:

git svn clone --trunk=/main --branches=/branches/Sprints/Iteration_1 --branches=/branches/Sprints/Iteration_2 --tags=/tags --authors-file=authors.txt svn://svn-project/projExample projExample

But I cannot figure out how to proceed and push the repo to BitBucket. Any help would be greatly appreciated!

It is also worth noting that I have tried the command git push origin master and received the below error:

error: src refspec master does not match any.
error: failed to push refs to '[my bitbucket origin]'.

An example of a previous question I have found is here. But this didn't seem to help. Perhaps I am doing something wrong?

Below are the commands in order run to get to the initial error described above:

  1. java -jar /svn-migration-scripts.jar verify
  2. java -jar /svn-migration-scripts.jar authors svn://svn-project/projExample > authors.txt
  3. Edit the authors.txt file to match all the current users names & emails.
  4. git svn clone --trunk=/main --branches=/branches/Sprints/Iteration_1 --branches=/branches/Sprints/Iteration_2 --tags=/tags --authors-file=authors.txt svn://svn-project/projExample projExample
  5. java -DFile.encoding=utf-8 -jar /svn-migration-scripts.jar clean-git --force
  6. git svn fetch
  7. java -Dfile.encoding=utf-8 -jar /svn-migration-scripts.jar sync-rebase
  8. java -Dfile.encoding=utf-8 -jar /svn-migration-scripts.jar clean-git --force
  9. git remote add origin
  10. git push -u origin --all
  11. Nothing happens.

Show source
| git   | svn   | migration   | git-svn   | svn2git   2017-01-03 13:01 0 Answers

Answers ( 0 )

◀ Go back