git-paste

Send commit patches to a pastebin service

TLDR

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

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
sudo dnf install git
sudo pacman -S git
sudo apk add git
sudo zypper install git
brew install git
nix profile install nixpkgs#git

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

git-format-patch(1), git-extras(1)

RESOURCES

Source code · Documentation