Reputation: 5
My team all has a very large project (10s of gigs) we are working on. We currently all have the exact same state via a USB share, and would like to use git to track our changes without having to send all the base files to a remote server.
Is there a way to init and sync a git repository where the server does not have the full files, just the diffs/changes? Or are there alternative solutions anyone is aware of?
Upvotes: 0
Views: 178
Reputation: 76649
No, you cannot have a Git repository that is metadata and diffs only. Git stores the entire contents of the repository. However, when the data is packed, it is stored very efficiently, so changes are effectively stored as differences against other files.
If your situation is that you'd like to have a smaller checkout or local copy, there are options like sparse checkout and partial clone. If your situation is that you don't want to use a server, you can store the data in a bare repository on a shared drive and pull from that. You can even send the data between yourselves via a set of email patches if you'd like.
But there is no way to not have at least one complete copy of the repository somewhere, whether that's on a server or on your machine.
Upvotes: 1
Reputation: 241928
That's what the --bare
option of init
and clone
does:
git init --bare
or
git clone --bare path-or-uri-of-the-original-repo
Upvotes: 0