Help converting SVN repo into a Git repo...

6 views
Skip to first unread message

Mel Riffe

unread,
Sep 2, 2015, 5:06:15 PM9/2/15
to RefactorRVA
Howdy Folks!

I'm finally getting my Cville client to move to Git, off of Subversion! Hurray! :-D

However I've run into something I wasn't expecting, and I was hoping some one here has seen/heard or this.

Background: I'm using these instructions: https://git-scm.com/book/en/v2/Git-and-Other-Systems-Migrating-to-Git#Subversion and I've been able to convert 2 small repositories successfully.

I'm now starting to convert the main Rails repo and when I get to the point in the instructions regarding tags and branches I can't proceed. :(

For this repo, my .git/refs/remotes/origin/tags folder is empty. And there are no branches under .git/refs/remotes/origin.

However, when I do: git branch -a I see them all, tags & branches, listed. But I can't check any of them out.

Does anyone have any idea what happened and how I can prevent it from happening again?

Thanks!

Jamie Orchard-Hays

unread,
Sep 3, 2015, 12:42:43 PM9/3/15
to refac...@googlegroups.com
“Subversion”? Now there’s a name I’ve not heard on a long, long time. :)

Dunno the answers, but found these:



--
You received this message because you are subscribed to the Google Groups "RefactorRVA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to refactorrva...@googlegroups.com.
To post to this group, send email to refac...@googlegroups.com.
Visit this group at http://groups.google.com/group/refactorrva.
For more options, visit https://groups.google.com/d/optout.

Roma Radford

unread,
Sep 3, 2015, 1:13:02 PM9/3/15
to refac...@googlegroups.com
Hi Mel,
 
I am not sure that this is your problem, but if you haven't done it yet, then I would try
 
git push origin --tags
 
The instructions that you followed suggested a 
 
git push origin --all
 
saying that would push up branches and tags.  However, the bitbucket instructions for adding an existing repo has
 
git push -u origin --all # pushes up the repo and its refs for the first time
git push -u origin --tags # pushes up any tags
 
I guess it would be easy enough to test, but I haven't.
 
Hope that helps,
 
Roma

Mel Riffe

unread,
Sep 3, 2015, 1:15:36 PM9/3/15
to refac...@googlegroups.com
Hi Roma,

Thanks for the information. However, after the initial 'conversion' there are no tags to correct, no tags to push.

While I don't know exactly where, I think my issue is somewhere in the middle of the initial clone of the Subversion repository.

But, thanks for the info!

--Mel

Keith Bennett

unread,
Sep 4, 2015, 12:42:47 AM9/4/15
to refac...@googlegroups.com
Hi, Mel. Could you tell us exactly what command you run and exactly
what happens to prevent you from proceeding?

Thanks,
Keith

Mel Riffe

unread,
Sep 7, 2015, 11:37:54 AM9/7/15
to refac...@googlegroups.com
Hey Keith,

I thought my original post already had the details you're asking about. From the link referenced I'm using the same commands to get a list of authors. I edit the resulting file. I then use a similar git svn clone command, but tailored for my client and authors file.

When I go to the next step, the one that moves the 'tags' to the right location in the git repository, I can't proceed. There is nothing under the source location for the tags (from the page linked): .git/refs/remotes/origin/tags/*  

Additionally, there is nothing under .git/refs/remotes, except for an empty origin/tags directory.

HTH

--Mel



Keith Bennett

unread,
Sep 7, 2015, 8:00:04 PM9/7/15
to refac...@googlegroups.com
Ok, sorry, I guess I was just being dense.

- Keith

Wayne Graham

unread,
Sep 9, 2015, 6:21:09 PM9/9/15
to refac...@googlegroups.com
Hi Mel,

I had to do this a while back and the switches for svn clone got a bit weird. Have you tried passing the --stdlayout flag? I wrote up note for myself on what I ran for the future at https://gist.github.com/waynegraham/a6c74eb4f027eb7cf4c2#clone-with-git-svn which may (but probably not) help.

Wayne
Reply all
Reply to author
Forward
0 new messages