Akshobhya
Akshobhya

Reputation: 139

GIT handling large number of branches

We are incorporating GIT in our project and now we are using SVN as version control tool. Our SVN project repository contains around 30 active branches and trying to migrate to GIT where in each branch size is 6 GB.

As we know GIT clone command will downloads the files from all branches, in our case its 30*6 = 180 GB. We cannot download 180 GB and work, so what can we do to achieve this.

Any help is appreciated.

Upvotes: 1

Views: 152

Answers (2)

Amit
Amit

Reputation: 46323

git (as many source control tools) is designed to contain mostly text files. It's "diffing" mechanism doesn't work well for binaries and indeed repository size can explode.

As obviously 6GB is not text, I'd suggest reconsidering this choice.

Additionally if your branches are so dissimilar, perhaps you should split them into separate repositories.

Upvotes: 2

VonC
VonC

Reputation: 1323793

Hopefully, you can remove any binary from your migration (meaning ignoring any path including elements that you can regenerate from the code).

Or, you would need to reference those large elements elsewhere, using Git-LFS:

Git Large File Storage (LFS) replaces large files such as audio samples, videos, datasets, and graphics with text pointers inside Git, while storing the file contents on a remote server like GitHub.com or GitHub Enterprise.

GitHub supports Git-LFS, since they proposed it in the first place.

Upvotes: 1

Related Questions