LinuxCommandLibrary

git-rscp

Copy files to remote git repositories

TLDR

Copy specific files from a remote

$ git rscp [remote_name] [path/to/file1 path/to/file2 ...]
copy

Copy a specific directory from a remote
$ git rscp [remote_name] [path/to/directory]
copy

SYNOPSIS

git clone rscp::[user@]host:path
git remote add origin rscp::[user@]host:path
git-rscp [--exit-code] [--version] command url

PARAMETERS

--exit-code
    Exit with non-zero status on command failure

--version
    Print version and exit

--help
    Display usage information

DESCRIPTION

git-rscp is a specialized Git remote helper that enables cloning, fetching, and listing remote repositories using standard scp and rsync commands over SSH. It translates Git's remote operations into rsync for efficient directory syncing (e.g., ls-remote, push if enabled) and scp for packfile transfers during fetch/clone. This allows seamless Git workflows with repositories on any SSH-accessible server without needing a full Git daemon or HTTP setup. Usage is transparent via custom URL scheme rscp::user@host:path. Ideal for air-gapped environments or simple SSH hosts. Note: limited to read-only operations like fetch; push support is minimal or absent in base version.

CAVEATS

Push operations not fully supported.
Requires rsync(1) and scp(1) installed.
Limited to uploadpack (fetch/clone) and ls-remote.
SSH key setup needed for passwordless access.

URL FORMAT

Use rscp::user@example.com:/path/to/repo.git for authentication and path specification.
Omitting user defaults to current $USER.

ENVIRONMENT VARIABLES

RSCP_RSYNC_OPTIONS: Extra options passed to rsync (e.g., '--compress').
RSCP_SCP_OPTIONS: Extra options for scp.

EXAMPLE

git clone rscp::git@example.com:~/myrepo.git
cd myrepo
git fetch

HISTORY

Developed by Keith Fish (kfish@ama.com.au) starting 2009. Hosted on GitHub; integrates with Git's pluggable remote helpers introduced in Git 1.6.6.

SEE ALSO

rsync(1), scp(1), git-remote-helpers(1), git-clone(1)

Copied to clipboard