I am migrating my SVN repository to Git (BitBucket) using this tutorial. But I have not used standard SVN layout so it seems to be little problematic.

My SVN repo is simple copy of Android project.


There is no trunk, branches and tags subfolders. You can say that project equals to the trunk.

git svn clone --trunk=/project --authors-file=authors.txt https://host/svn/dirname project
Initialised empty Git repository in /home/osboxes/GitMigration/project/.git/
Checked out HEAD:
https://host/svn/dirname/project r300

Next step shall have been clean up but it failed. Maybe because I do not have any branches:

java -jar ~/svn-migration-scripts.jar clean-git
Could not retrieve the config for the key: svn-remote.svn.branches

But then it failed and I do not know how to continue

java -jar ~/svn-migration-scripts.jar sync-rebase
fatal: ambiguous argument 'remotes/trunk': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Error finding tracking ref for branch master
  • why downvote? I do not understand – Leos Literak Sep 23 '16 at 4:00

It seems to me fixed. What I did:

  1. rearranged SVN repository to standard layout
  2. git svn clone --stdlayout --prefix='' --authors-file=authors.txt https://host/svn/dirname project

I found an attlassian issue #2 from 2014 with a reequest to add Git 2.0 compatibility. It has 22 votes and it is not resolved yet. There was a hint to use the prefix parameter.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.