Link to home
Start Free TrialLog in
Avatar of thready
thready

asked on

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

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
Avatar of thready
thready

ASKER

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
Avatar of evilrix
>> 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 ;)
Avatar of thready

ASKER

it takes a half day.......
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"
Avatar of thready

ASKER

fatal: 'FETCH_HEAD' does not point to a commit
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 :)
ASKER CERTIFIED SOLUTION
Avatar of thready
thready

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of thready

ASKER

This worked for me....
Avatar of thready

ASKER

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
No worries Mike. Glad you figured it out :)