1

I'm currently trying to move our large Subversion repository, around 25GB including history, into GIT and I seem to have hit two issues. One of which I think I've resolved, but I'll cover both for completeness in case I screwed up the first fix;

The Subversion repository doesn't appear to follow a consistent pattern for branching, it looks like the pattern changed over the years, so to start with I used the rootistrunk option to get the whole repo to git:

svn2git http://svnurl/repo --rootistrunk --authors authors.txt

This worked however the repo was then too large to push to remote and I received the following error; [remote rejected] master -> master (Maximum request length exceeded)

To work around this I used the following method to get a chunk of the Subversion repo in the hope I could get 500 commits at a time and work around the large packing issue;

svn2git http://svnurl/repo --rootistrunk --authors authors.txt --revision 1:500

I then pushed and it worked, I then ran git svn fetch -r 501:1000 to get the next 500 commits but when I try and push after this latest fetch I get a message saying "Everything up-to-date" despite the fact that can't be the case.

I've scoured the help files for git and svn2git in the hope I can find out what I've done wrong but after a few days of research I've still no solution, I'm a newbie to git so likely I've missed something obvious to an old hat. Can anyone shed any light on what I'm doing wrong please? If I've made a false assumption and I'm doing it all wrong I'd be happy to hear it as it wouldn't surprise me at this stage!

I'm currently trying to push into a TFS 2013 project and a Stash repo, both show the same behaviour so I must have done something wrong on the GIT side. The first push works in both cases, only the second that doesn't want to accept new files. The server I'm performing the push from runs Ubuntu, TFS is on Windows Server 2012 and Stash is on another Ubuntu box.

Any tips welcome, I'm baffled at the minute and no idea where to go next.

Thanks, Keegan

1 Answers1

0

After your first import, try this: git svn rebase

But, the best approach, if you svn repository is really big (more than 1GB), is avoid to import all the revisions. I would recommend to start from a more recent timeline and save a svn dump in safe place if some day you really want to look very old revisions.

If you choose to import from a more recent timeline, the result is something like this:

svn2git http://svnurl/repo --rootistrunk --authors authors.txt --revision 500:HEAD

When the first 500 commits are not pulled to git.

ayr-ton
  • 353
  • 1
  • 4
  • 13
  • Thanks Ayr_Ton, I'll give rebase a go. Alas, maintaining history is a hard requirement for this project though I'll have a go at convincing them. – Keegan Neave Jul 30 '13 at 09:35
  • If I understand it right, rebase would combine all changes from 500 -> head into one commit? Not sure I could sell that to the company as an option. :/ – Keegan Neave Jul 31 '13 at 09:35
  • It will pull all commits from your last update to the HEAD. Not only one commit. Like, if you have imported the first 500 commits, you will rebase from 501 to HEAD. – ayr-ton Aug 01 '13 at 12:56
  • Ah, I think I understand. Would that push them into git as one commit though or individually? Sorry if I'm not using the right terminologies, still getting to grips with it. – Keegan Neave Aug 01 '13 at 14:14
  • I've just realised I've missed a step in that last question. If I then pushed from git to a remote repo would it be pushed in as one commit or as individual commits? Sorry again for not phrasing things right and missing info off, all a bit muddled. – Keegan Neave Aug 01 '13 at 14:46
  • All the individual commits that you not have in the remote origin are pushed up. – ayr-ton Aug 05 '13 at 01:34