0

I've been tasked with migrating our SVN to Git, while I've managed to do some projects there is one project that is giving me trouble.

Having converted this project, the Git repo is over 6Gb. Note I have removed all binaries for SVN before the migration.

This project has over 1000 tags and 100 branches, and within the .git folder the svn folder is @4.9Gb not sure what I can do. I don't want to lose history, but I can not see how to reduce this folder.

  • Possible duplicate of [Reduce git repository size](https://stackoverflow.com/questions/2116778/reduce-git-repository-size) – Peter Reid Jun 19 '17 at 09:44

2 Answers2

1

In addition of my old answer, which is for one Git repo, you could consider having *multiple Git repos.

That is: doing the SVN migration of a sub-folder of the SVN repo (to one Git repo)

That way, you end up with a collection of Git repos more manageable in size, which can be interesting if you don't need the all content in order to develop.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Yeah that is what I was doing, this one project is many years old and still in development. The problem is the 1000s of Tags – Pabs TheGeek Jun 19 '17 at 09:57
  • @PabsTheGeek I usually loop on the tags, and import them in the Git repo (skipping the intermediate revisions) – VonC Jun 19 '17 at 10:01
0

over 1000 tags and 100 branches

Branching and tagging is cheap in SVN and in git and should not cause your repository to be 4-6GB. There have to be other data that's taking up the space. Or the project you work with is large by itself.

The problem is that you expect git repository to be (much) smaller that SVN repository. This is a common mistake. SVN and git repository with the same dataset will be about the same size and git repository can be even larger in certain cases.

SVN solves this problem by providing you with disposable working copies that are fast to checkout. However, as you must clone a whole repository with git, you will have to divide your single monorepo into multiple smaller repositories.

bahrep
  • 29,961
  • 12
  • 103
  • 150