← 返回命令列表

Linux command

git-remote-fd 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Clone using file descriptors

git clone "fd::[fd-in],[fd-out]"

Fetch using pre-opened

git fetch "fd::17,18"

Use a single file descriptor

git fetch "fd::17"

说明

git-remote-fd is a Git remote helper program that uses pre-opened file descriptors for communication instead of establishing its own connections. When a URL in the form `fd::in,out` is used, Git invokes this helper to transfer data over the specified file descriptors. If only one file descriptor is provided, it is used for both reading and writing. If two are given separated by a comma, the first is used for reading from the remote and the second for writing. This enables integration with connection brokers, process supervisors, or custom transport layers that manage connections externally. The file descriptors must be opened before invoking Git.

参数

in
File descriptor number for reading from the remote. If out is omitted, this descriptor is used for both directions.
out
File descriptor number for writing to the remote.

FAQ

What is the git-remote-fd command used for?

git-remote-fd is a Git remote helper program that uses pre-opened file descriptors for communication instead of establishing its own connections. When a URL in the form `fd::in,out` is used, Git invokes this helper to transfer data over the specified file descriptors. If only one file descriptor is provided, it is used for both reading and writing. If two are given separated by a comma, the first is used for reading from the remote and the second for writing. This enables integration with connection brokers, process supervisors, or custom transport layers that manage connections externally. The file descriptors must be opened before invoking Git.

How do I run a basic git-remote-fd example?

Run `git clone "fd::[fd-in],[fd-out]"` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does in do in git-remote-fd?

File descriptor number for reading from the remote. If out is omitted, this descriptor is used for both directions.