LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

git-rscp

Copy files from a remote repository's working directory via rsync

TLDR

Copy specific files from a remote into the current directory
$ git rscp [remote] [file]
copy
Copy a remote directory
$ git rscp [remote] [directory]
copy

SYNOPSIS

git rscp remote files...

DESCRIPTION

git rscp is the reverse direction of git-extras' `git scp`: it copies the given files or directories from a remote's working directory to the current working directory using rsync. It is the same script as `git-scp`, just invoked under a different name, which switches it into "pull" mode instead of scp's default "push and stage" mode.The destination path is derived from the named remote's configured URL, so the remote must already exist in `git remote`.

INSTALL

sudo apt install git
copy
sudo dnf install git
copy
sudo pacman -S git
copy
sudo apk add git
copy
sudo zypper install git
copy
brew install git
copy
nix profile install nixpkgs#git
copy

CAVEATS

Part of git-extras package; requires `rsync` and, for SSH remotes, `ssh` to be installed. Unlike `git scp`, files copied this way are not automatically staged.

SEE ALSO

git-scp(1), rsync(1), git-extras(1)

RESOURCES

Copied to clipboard
Kai