Having trouble doing a one-way migration from SVN to Git at the clean-git step.

Marco Roman May 24, 2021

Some background: I am testing out migrating an existing SVN repository hosted in Assembla to a Git repository in Bitbucket. I'm using a very small sample project with a couple of tags and no branches as a test case.

While following the Atlassian guide for migrating from SVN to Git, I ran into a problem at the Convert step. I was able to successfully run the git svn clone command with the --stdlayout option. As expected, the tags from the SVN repository are displayed when I run the git branch -r command. However, the tags still do not appear after I run the clean-git command:

java -Dfile.encoding=utf-8 -jar ~/svn-migration-scripts.jar clean-git --force

The above command generates the following output:

image.png

After this, running git branch only shows the master branch (which I suppose is expected since I have nothing in the /branches directory), but running git tag returns nothing at all.

I have already tried duplicating the above steps but explicitly providing the trunk, branches, and tags directories to the git svn clone command.

Has anyone had this problem before, and can anyone suggest a remedy?

1 answer

0 votes
Kyle Krueger
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 17, 2024

Try using (--prefix="") when doing the git clone in the convert step. 

This article below explains the change in git 1.X to git2.x where the the default value of prefix was changed. 

You can see this when you run clean-git that the svn branches are prepended with "origin/"

I found this article that helped me with the issue. 
https://elmund.io/2017/06/22/fixing-the-git-clean-command-in-the-atlassian-svn-git-migration-scripts/

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events