Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

git svn clone gives remote refs error

I am on Windows 7 Ultimate 64 bit, running Subversion 1.7.6 with Git version 1.8.0.mysysgit.0

I have Git running from a Bash window, not from a Windows command window

I am following the instructions to migrate my OnDemand Subversion repository to BitBucket -

Everything seemed to go well on the first section labled "Prepare." When I went to the "initial clone" page ( I ran into a few issues immediately with the git svn clone section. First of all I was getting an error that said "Expected FS format '2'; found format'4'. I found help for that which recommeded that I add the --pre-1.5-compatible flag to the svnadmin create command from the previous page. So, I remade my local SVN repository with the flag and the error went away.

I tried the command again, as follows:

$ git svn clone --trunk=/trunk --branches=/branches --tags=/tags --authors-file
=authors.txt file:////c/Temp/SVNMigration/TempProjects/TEST test.git

This returns the error:

svn-remote.svn: remote ref '/Program Files (x86)/Git/trunk:refs/remotes/trunk' must start with 'refs/'

I looked at the remote section in the git config file in my newly created test.git repository, and found the following:

[svn-remote "svn"]
	url = file:///c/Temp/SVNMigration/TempProjects
	fetch = TEST/C:/Program Files (x86)/Git/trunk:refs/remotes/trunk

Since this file was created by the process, how could it be the problem? How do I fix this?



2 answers

If someone happens to be in the same sittuation (if you search for "git config fetch = C:/Program Files (x86) remote ref" this page is the first result) I resolved this problem changing the clone command from:

$ git svn clone --authors-file=authors.txt --trunk=/trunk --branches=/branches --tags=/tags/Release git-project

to this:

$ git svn clone --authors-file=authors.txt --trunk=trunk --branches=branches --tags=tags/Release git-project

Note the removed leading slash "/" from the trunk, branches and tags parameters.

As I said, I recived this error in Windows. Switching to Ubuntu fixed the problem, although, according to the directions, Windows should have worked.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in DevOps

Introducing Atlassian Open DevOps

Hey Community! I’m Shana, a member of our DevOps team here at Atlassian. I wanted to make sure you saw our announcement last week about the launch of Open DevOps since you may have missed it amidst a...

501 views 2 7
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you