Solved

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

Posted on 2011-09-14
10
529 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

863 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now