Solved

git - cloned svn, did some work with svn, now want to update

Posted on 2011-09-14
10
532 Views
Last Modified: 2012-05-12
Hi Experts,

I cloned my svn repo using "git svn clone http://Myrepo localdir"

I then ignored git, used svn for about 40 more commits.  Git now points to an older revision that svn was using (from when it cloned).

Now I want to pull the rest of the changes from svn into my cloned git repo, how do I do it?

Thanks!
Mike
0
Comment
Question by:thready
  • 6
  • 4
10 Comments
 
LVL 1

Author Comment

by:thready
ID: 36538575
I found it - I used "git svn fetch" - that did it.  However, now that I try to rebase with "git svn rebase", I get errors saying lots of files "needs update", but these files have all been checked in to svn and should have been pulled with the "git svn fetch" that I did.... What am I not understanding properly here?

Thanks!
Mike
0
 
LVL 40

Expert Comment

by:evilrix
ID: 36538604
>> Now I want to pull the rest of the changes from svn into my cloned git repo, how do I do it?
Meh, just delete the git repo and re-clone it ;)
0
 
LVL 1

Author Comment

by:thready
ID: 36538610
it takes a half day.......
0
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
LVL 40

Expert Comment

by:evilrix
ID: 36538629
Wow! It must be a huge repository!

>> and should have been pulled with the "git svn fetch"
fetch only pull changes, it doesn't merge them. Try "git merge FETCH_HEAD"
0
 
LVL 1

Author Comment

by:thready
ID: 36538653
fatal: 'FETCH_HEAD' does not point to a commit
0
 
LVL 40

Expert Comment

by:evilrix
ID: 36538675
Hmmm. To tell the truth, I don't really know then. Other than clone my own svn repos I've always worked 100% with git so at this point I'm about as clued up as you =/

The only other thing I can think of would be to do a hard reset to get your git repo back to a clean start and then try a git svn rebase to rebase the svn changes into the git repo. Not sure if that will work any better. If it doesn't you are probably better off swollowing the pain of just re-cloning and then uninstalling your svn client so you won't be tempted to use it any more :)
0
 
LVL 1

Accepted Solution

by:
thready earned 0 total points
ID: 36539355
I got it!  I added all these "changes" that weren't supposed to be there with "git add -A" - then I committed them.  I was then able to do a "git svn rebase" (which I have to read up on again because I forget what that does exactly)...
0
 
LVL 1

Author Closing Comment

by:thready
ID: 36558809
This worked for me....
0
 
LVL 1

Author Comment

by:thready
ID: 36539361
Note that I would have given you the points just because you are very often helpful, but then moderators have come back on me when I don't accept the real solution!  Thanks again evilrix!  I love git already!  :o)

Mike
0
 
LVL 40

Expert Comment

by:evilrix
ID: 36539476
No worries Mike. Glad you figured it out :)
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question