Error synchronizing SVN to Git

I'm using the SVN to Git migration guide:!migration-synchronize

So far everything has gone well. The Git repository was created and I have synchronized several times to keep the repository up to date with SVN.

However, today I am unable to syncronize and unfortunately I am not yet knowledgable enough about Git to understand what might cause this error.

I ran 'git svn fetch' successfully, but then when I tried to rebase using the Attlassian SVN migration scripts I got the following error. Is this a bug with the Atlassian SVN migration scripts?

$ java -Dfile.encoding=utf-8 -jar ../svn-migration-scripts.jar sync-rebase
fatal: ambiguous argument 'heads/(detached from 22ff5b8)': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
An unexpected error occured, please attach /tmp/svn-git-migration.log to any related support issue
Exception in thread "main" java.lang.RuntimeException: Nonzero exit value: 128
	at scala.sys.package$.error(package.scala:27)
	at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.slurp(ProcessBuilderImpl.scala:131)
	at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.$bang$bang(ProcessBuilderImpl.scala:101)
	at com.atlassian.svn2git.Git.$(Utils.scala:127)
	at com.atlassian.svn2git.SyncRebase$$anonfun$apply$2.apply(SyncRebase.scala:31)
	at com.atlassian.svn2git.SyncRebase$$anonfun$apply$2.apply(SyncRebase.scala:30)
	at scala.collection.immutable.Stream.foreach(Stream.scala:291)
	at com.atlassian.svn2git.SyncRebase$.apply(SyncRebase.scala:30)
	at com.atlassian.svn2git.Main$$anonfun$7.apply(Main.scala:57)
	at com.atlassian.svn2git.Main$$anonfun$7.apply(Main.scala:52)
	at scala.Either.fold(Either.scala:44)
	at com.atlassian.svn2git.Main$delayedInit$body.apply(Main.scala:47)
	at scala.Function0$class.apply$mcV$sp(Function0.scala:34)
	at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
	at scala.App$$anonfun$main$1.apply(App.scala:60)
	at scala.App$$anonfun$main$1.apply(App.scala:60)
	at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
	at scala.collection.immutable.List.foreach(List.scala:45)
	at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:30)
	at scala.App$class.main(App.scala:60)
	at com.atlassian.svn2git.Main$.main(Main.scala:22)
	at com.atlassian.svn2git.Main.main(Main.scala)

2 answers

1 accepted

This widget could not be displayed.

Hi Simon,

Looks like the migration scripts aren't handling the case where you are in an "detached head" state (ie. you're not on a branch). What branch were you on when you ran sync-rebase? If you checkout master and run the scripts again does it work?



Thanks, that solved it. Not sure how I ended up in a detached head state (I didn't knowingly switch branch), but running 'git checkout master' then re-running the scripts solved the problem.

This widget could not be displayed.

I got the same Problem with the Plugin but i do not understand how I should run them again, I can not access my stash repo to delete it or do anything because of the error "Detached heads are not supported" what should i do? how can i delete the repo?

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Aug 10, 2018 in Bitbucket

What is your #1 piece of advice to new users getting started using Bitbucket?

Hello Community! My name is Claire Maynard, and I’m a Product Marketing Manager on the Bitbucket team. I’m interested in hearing what advice or tips you have for new users getting started on ...

282 views 15 2
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you