3

I'm using Git-1.6.5.1-preview20091022.exe.

I've cloned a SubVersion repository using:

git svn clone -s https://xxxxx:8443/svn/project/SubProjectA

The SubProjectA has the standard layout (trunk, branches, tags). SubProjectA is a copy of another project. It has only 60 revisions if it own. After the command, a folder is created with the name SubProjectA and has only remotes/trunk as the branch. Even the master branch does not exists.

I then have to run

git svn fetch

multiple times to get all revisions from the SubVersion. Every time the fetch command is ran, it fetches only one revision at a time.

I've tried:

git svn fetch -r2400:HEAD
git svn fetch -r2400:2450

without success (SubProjectA is copied at revision 2390, there are one branch of SubProjectA created at revision 2420, the latest revision is 2450).

What did I do that caused the fetch command to fetch only one revision at a time? How do I tell fetch to get all revisions?

1 Answer 1

4

To do a full update, use

git svn rebase

You should read this article about working using svn-git.

4
  • Git still only fetches some revisions, not all. I've just tried git svn rebase, and it fetches 3 revisions. When I run git svn rebase again, the remaining 2 revisions are fetched.
    – tvbusy
    Feb 1, 2010 at 11:26
  • That's because you have run git svn fetch before doing git svn rebase. I suggest you start again with blank repo, and follow steps in the article I give above. Feb 2, 2010 at 0:38
  • Did this issue ever get resolved? I am struggling with this issue now and I can't do a "git svn rebase" right after the "git svn init" because I get an error "Fatal: ambiguous argument 'HEAD'" I googled the error and the fix is to run "git svn fetch"! :-P Any further clarification would be greatly appreciated.
    – Patrick
    Jan 5, 2011 at 3:58
  • @Patrick, it's better you create a new question, and include the detail about your repository state. Jan 8, 2011 at 16:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.