git-upload-archive
Send Git archive over a dumb transport
SYNOPSIS
git upload-archive [--exec=<git-upload-archive>] <directory>
PARAMETERS
--exec=<git-upload-archive>
Specifies the full path to the git-upload-archive command on the remote host. This is useful for environments where the command is not in the standard PATH or a custom binary is used.
DESCRIPTION
git-upload-archive is a crucial plumbing command within Git, primarily designed to facilitate the serving of repository archives to clients. It operates on the server-side, typically invoked by the git-archive command over a network connection like SSH. Its core function is to receive a list of desired paths (relative to the repository's root) from the client and then stream the corresponding archive data back.
This command is not intended for direct use by end-users; rather, it forms an essential component of Git's remote repository interaction, enabling operations such as git archive --remote. While SSH is the most common transport, it can be configured to work over other protocols. It ensures that when a client requests an archive, the server can efficiently pack and transmit the requested files and directories.
PROTOCOL
The client communicates with git-upload-archive by sending a series of lines, each representing a path relative to the repository's root, followed by a flush packet. The server then responds by sending the archive data. This low-level protocol is handled automatically by the git-archive client command and is not typically interacted with directly by users.
SEE ALSO
git-archive(1), git-daemon(1), git-shell(1)