Solved

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

Posted on 2011-09-14
10
533 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
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

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!

Question has a verified solution.

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

Suggested Solutions

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled

730 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