Reputation: 15519
I have a team member who has a bandwidth limit, and cannot download the files and repo from our Git host. He does, however, have the non-git files (that are at the latest version) on his computer already. I need him to be able to connect to the git repository using the existing files so he only has to download differences. Is this possible?
Upvotes: 2
Views: 76
Reputation: 116337
No, this is NOT possible. Central to git
operation is git object store, and everything you do in git needs it. Having big files not under git control does not help git to get full copy of git object store. And git does not consider given directory to be git repository until full copy of git object store is present in .git
subdirectory.
Typically, to speed up first clone, it helps to perform git gc
on a server (maybe even in cron job), so git repo is well-packed.
Also, you can create git bundle and send a copy of this bundle using some other protocol - HTTP, FTP, DVD, hard drive by mail, etc. For example, Android project is using this technique to make first repo sync work faster. Upon receiving bundle, you can clone from it, and finally add original remote.
Upvotes: 4
Reputation: 28981
Unless you have a lot of often changing binary files, the git repository is smaller than files, because data stored very efficiently. If he cannot download repository by network, you could put a repo clone on CD, memory stick, etc. When he would have a repo, he could checkout files. When he easily send only diffs by network or as patches by e-mail.
Upvotes: 1