Reputation: 400
I need to share a large git repository (>3GB in total, .git folder is ~1.1GB) as Windows Shared Folder over LAN with my colleagues. But they found it is really slow to clone and push/pull -- i.e. waits ~30min before the clone starts, and suspended ~5min before any push/pull starts.
Does everyone know any methods to reduce the latency or better way to share the repo?
P.S. I don't want to setup a Gitlab because it's too complicated.
Upvotes: 3
Views: 2625
Reputation: 400
git daemon
works really well in this situation. Its performance is good, but lacks of security on Windows Server.
On server side, run the following command:
cd ~/Documents/All-My-Git-Repos/
git daemon --verbose --reuseaddr --export-all --enable=receive-pack --base-path=.
On client side, clone any repo like this:
git clone git://my-git-server-address/repo-folder-name repo-clone-name
While using this on Windows server, the firewall will prompt for permissions on Port 9418, which should be granted.
Upvotes: 2
Reputation: 38096
Since your git repo is very big, you can bundle the whole git repo or part of commits among your colleagues sharing.
Bundle the whole repo: git bundle create repo.bundle --all
Bundle a branch: git bundle create repo.bundle branchname
Bundle some commits: git bundle create commits.bundle branchname ^commit
For the one who apply the bundled commits to his local repo, he can verify the bundle file by git bundle verify /path/to/bundle/file
.
More details, you can refer Git's Little Bundle of Joy and git bundle.
Upvotes: 4