LinuxCommandLibrary

git-scp

Copy files from the current working tree to the working directory of a remote repository.

TLDR

Copy unstaged files to a specific remote

$ git scp [remote_name]
copy


Copy staged and unstaged files to a remote
$ git scp [remote_name] HEAD
copy


Copy files that has been changed in the last commit and any staged or unstaged files to a remote
$ git scp [remote_name] HEAD~1
copy


Copy specific files to a remote
$ git scp [remote_name] [path/to/file1 path/to/file2 ...]
copy


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

Copied to clipboard