LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

git-paste

Send commit patches to a pastebin service

TLDR

Paste commits not yet in the upstream branch
$ git paste
copy
Paste a specific revision range
$ git paste [HEAD~3..HEAD]
copy
Paste a single commit
$ git paste -1 [commit]
copy

SYNOPSIS

git paste [git-format-patch-args]

DESCRIPTION

git paste runs `git format-patch --stdout` over the given commits and pipes the resulting diff to pastebinit, printing the pastebin URL. Part of git-extras, it is a quick way to share a patch or a small commit series without creating a file first.Because it delegates to `pastebinit`, the destination pastebin service (and any API key) is whatever `pastebinit` is configured to use, not necessarily GitHub Gist.

PARAMETERS

ARGS

Any arguments accepted by `git format-patch` (revision range, `-1`, `-n`, etc). Defaults to `@{u}` (commits ahead of the upstream branch) when omitted.

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

Requires pastebinit to be installed separately; the command aborts with an error if it is missing. Pasted content is sent to a third-party service, so avoid pasting patches containing secrets.

SEE ALSO

RESOURCES

Copied to clipboard
Kai