?
Solved

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

Posted on 2011-09-14
10
Medium Priority
?
539 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

762 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