Interview Prep/Git & GitHub/Conflicts, remotes, fetch, pull and push

Describe what happens on the wire during `git push` over smart HTTP.

AdvancedConceptConflicts, remotes, fetch, pull and push
Answer

The client asks info/refs?service=git-receive-pack, receives the server's ref advertisement with capabilities, computes the objects the server lacks, and sends commands (old SHA, new SHA, ref) followed by a packfile. The server's receive-pack runs hooks (pre-receive, update), writes objects and updates refs, then reports per-ref status.

All Git & GitHub questions Roadmap: Git & GitHub

More on Conflicts, remotes, fetch, pull and push