1

I am looking for options to manage our dotnet legacy application's huge codebase on git. Organization is planning to shift to git operations but cloning a webpack on Bitbucket takes several minutes (20 25 minutes). even with 50 Mbps LAN wired connections Also inital commit and git push takes similar amount of time while setting up the repository.

We use Bitbucket DataCenter as repository hosting service.

Folder structure of WebApp: Size of repository on Bitbucket: 1.47 GB (after compression)

Webapp: Contains all the source code files (aspx.vb,html,css files, more than 30k code files)

Size on disk: 1.11 Gb

Services: contains svc and .dll files

size on disk: 208 Mb

SOA: contains .dll and batch files and service source codes(.sln files)

Size on disk: 3.1 Gb

Total size of project on disk: 4.8 Gb

Is there any way to use the git system effectively for such heavy applications? Would appreciate it if anyone can suggest a good way for managing it. Thanks for your time!

Pratik M
  • 70
  • 2
  • 9

1 Answers1

0

Assuming the services ad SOA does not change that often, you could use two local clones of the same repository, using git sparse-checkout

  • one with only the common parts (services, SOA)
  • one with only the part you need to update, making symlinks to the other parts (services, SOA) from the first repository.

Make sure to use Git 2.34+, since it comes with sparse-index, as described in "Make your monorepo feel small with Git’s sparse index" from Derrick Stolee.

  • sparse-checkout allows you to have a quick clone, and a reasonnable checkout.
  • sparse-index allows for commands like git status to be snappy.

The other approach involves Git LFS (Large File Storage), which involves the remote Hit repository hosting service support (meaning in your case, BitBucket).

It is possible, but will have limits and quotas associated with the amount of large files stored.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Hi, Thanks for your response @VonC, I will have to check git sparse functionality, will try the use case and update. Meanwhile searching for the solution I came across git LFS concept, just curious can using LFS help me for this case or it's only meant for handling binary files or single entity huge size files? – Pratik M Nov 25 '21 at 13:08
  • @PratikM As its name suggests (Large File Storage), it is meant for large files only. I have edited the answer with relevant links regarding LFS. – VonC Nov 25 '21 at 13:13