Text of git-scm.com › docs › gitremote-helpers.html as Styx crawled it on Nov 20, 2026. The page may have changed since. Only its words are kept, without pictures or layout, and only the first part of a long page.

Open the live page

Git - gitremote-helpers Documentation

English ▾ English Topics ▾ Setup and Config git config help bugreport Credential helpers Getting and Creating Projects init clone Basic Snapshotting add status diff commit notes restore reset rm mv Branching and Merging branch checkout switch merge mergetool log stash tag worktree Sharing and Updating Projects fetch pull push remote submodule Inspection and Comparison show log diff difftool range-diff shortlog describe Patching apply cherry-pick diff rebase revert Debugging bisect blame grep Email am apply imap-send format-patch send-email request-pull External Systems svn fast-import Server Admin daemon update-server-info Guides gitattributes Command-line interface conventions Everyday Git Frequently Asked Questions (FAQ) Glossary Hooks gitignore gitmodules Revisions Submodules Tutorial Workflows All guides...

Administration clean gc fsck reflog filter-branch instaweb archive bundle Plumbing Commands cat-file check-ignore checkout-index commit-tree count-objects diff-index for-each-ref hash-object ls-files ls-tree merge-base read-tree rev-list rev-parse show-ref symbolic-ref update-index update-ref verify-pack write-tree Latest version ▾ gitremote-helpers last updated in 2.51.0 2.51.1 → 2.56.1 no changes 2.51.0 2025-08-18 2.45.1 → 2.50.2 no changes 2.45.0 2024-04-29 2.38.1 → 2.44.4 no changes 2.38.0 2022-10-02 2.28.1 → 2.37.7 no changes 2.28.0 2020-07-27 2.24.1 → 2.27.1 no changes 2.24.0 2019-11-04 2.22.1 → 2.23.4 no changes 2.22.0 2019-06-07 2.18.1 → 2.21.4 no changes 2.18.0 2018-06-21 2.17.1 → 2.17.6 no changes 2.17.0 2018-04-02 2.14.6 → 2.16.6 no changes 2.13.7 2018-05-22 2.12.5 2017-09-22 2.11.4 2017-09-22 2.10.5 no changes 2.9.5 2017-07-30 2.7.6 → 2.8.6 no changes 2.6.7 2017-05-05 2.5.6 no changes 2.4.12 2017-05-05 2.3.10 no changes 2.2.3 2015-09-04 2.1.4 no changes 2.0.5 2014-12-17 NAME gitremote-helpers - Helper programs to interact with remote repositories SYNOPSIS git remote-<transport> <repository> [<URL>] DESCRIPTION Remote helper programs are normally not used directly by end users, but they are invoked by Git when it needs to interact with remote repositories Git does not support natively.

A given helper will implement a subset of the capabilities documented here. When Git needs to interact with a repository using a remote helper, it spawns the helper as an independent process, sends commands to the helper’s standard input, and expects results from the helper’s standard output. Because a remote helper runs as an independent process from Git, there is no need to re-link Git to add a new helper, nor any need to link the helper with the implementation of Git.

Every helper must support the "capabilities" command, which Git uses to determine what other commands the helper will accept. Those other commands can be used to discover and update remote refs, transport objects between the object database and the remote repository, and update the local object store. Git comes with a "curl" family of remote helpers, that handle various transport protocols, such as git-remote-http , git-remote-https , git-remote-ftp and git-remote-ftps .

They implement the capabilities fetch , option , and push . INVOCATION Remote helper programs are invoked with one or (optionally) two arguments. The first argument specifies a remote repository as in Git; it is either the name of a configured remote or a URL. The second argument specifies a URL; it is usually of the form <transport>://<address> , but any arbitrary string is possible. The GIT_DIR environment variable is set up for the remote helper and can be used to determine where to store additional data or from which directory to invoke auxiliary Git commands.

When Git encounters a URL of the form <transport>://<address> , where <transport> is a protocol that it cannot handle natively, it automatically invokes git remote-<transport> with the full URL as the second argument. If such a URL is encountered directly on the command line, the first argument is the same as the second, and if it is encountered in a configured remote, the first argument is the name of that remote. A URL of the form <transport>::<address> explicitly instructs Git to invoke git remote-<transport> with <address> as the second argument.

If such a URL is encountered directly on the command line, the first argument is <address> , and if it is encountered in a configured remote, the first argument is the name of that remote. Additionally, when a configured remote has remote. <name> .vcs set to <transport> , Git explicitly invokes git remote-<transport> with <name> as the first argument. If set, the second argument is remote. <name> .url ; otherwise, the second argument is omitted.

INPUT FORMAT Git sends the remote helper a list of commands on standard input, one per line. The first command is always the capabilities command, in response to which the remote helper must print a list of the capabilities it supports (see below) followed by a blank line. The response to the capabilities command determines what commands Git uses in the remainder of the command stream. The command stream is terminated by a blank line.

In some cases (indicated in the documentation of the relevant commands), this blank line is followed by a payload in some other protocol (e.g., the pack protocol), while in others it indicates the end of input. Capabilities Each remote helper is expected to support only a subset of commands. The operations a helper supports are declared to Git in the response to the capabilities command (see COMMANDS, below). In the following, we list all defined capabilities and for each we list which commands a helper with that capability must provide.

Capabilities for Pushing connect Can attempt to connect to git receive-pack (for pushing), git upload-pack , etc for communication using git’s native packfile protocol. This requires a bidirectional, full-duplex connection. Supported commands: connect . stateless-connect Experimental; for internal use only. Can attempt to connect to a remote server for communication using git’s wire-protocol version 2. See the documentation for the stateless-connect command for more information.

Supported commands: stateless-connect . push Can discover remote refs and push local commits and the history leading up to them to new or existing remote refs. Supported commands: list for-push , push . export Can discover remote refs and push specified objects from a fast-import stream to remote refs. Supported commands: list for-push , export . If a helper advertises connect , Git will use it if possible and fall back to another capability if the helper requests so when connecting (see the connect command under COMMANDS).

When choosing between push and export , Git prefers push . Other frontends may have some other order of preference. no-private-update When using the refspec capability, git normally updates the private ref on successful push. This update is disabled when the remote-helper declares the capability no-private-update . Capabilities for Fetching connect Can try to connect to git upload-pack (for fetching), git receive-pack , etc for communication using the Git’s native packfile protocol.

This requires a bidirectional, full-duplex connection. Supported commands: connect . stateless-connect Experimental; for internal use only. Can attempt to connect to a remote server for communication using git’s wire-protocol version 2. See the documentation for the stateless-connect command for more information. Supported commands: stateless-connect . fetch Can discover remote refs and transfer objects reachable from them to the local object store.

Supported commands: list , fetch . import Can discover remote refs and output objects reachable from them as a stream in fast-import format. Supported commands: list , import . check-connectivity Can guarantee that when a clone is requested, the received pack is self contained and is connected. get Can use the get command to download a file from a gi

The rest of this page is on the live site.