Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does GIT Push work?

Tags:

git

I have a large project (several hundred MB), if I use a remote GIT repository, does GIT client push the entire directory even when you only make small change in a single file?

Thanks

like image 720
BruceL Avatar asked Dec 16 '22 03:12

BruceL


1 Answers

No, the git client and server negotiate a list of what objects have changed, and only those are sent. The only time you transmit more than is absolutely necessary is using a "dumb" HTTP server, and fetching a complete pack that contains more objects than are required on the client.

http://book.git-scm.com/7_transfer_protocols.html has some detail on the protocol at a technical level, and should give you the terminology to go further if you care about the how and why.

like image 195
Daniel Pittman Avatar answered Dec 19 '22 08:12

Daniel Pittman