Git wire protocols
Also called: Git protocol v2, Git smart protocol, fetch negotiation
Git wire protocols let a client and server exchange repository information and objects. They are distinct from Git’s local object storage and can be carried over transports such as SSH or HTTP. Protocol version 2 organizes supported fetch-side operations as commands with advertised capabilities.
During a fetch, a client can discover references and negotiate which objects it needs using what it already has. The server sends the required object data in a packfile. This saves sending every object on each update. Version negotiation and packet-line framing govern the conversation; a successful network transfer alone does not decide how branches should be merged locally.
- Related
- Message framing, Version negotiation, HTTP
- Further reading
- Git — Protocol version 2