← 返回命令列表

Linux command

gist 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Create a gist from file

gist [file]

Create public gist

gist -p [file]

Create from stdin

echo "[content]" | gist

Create with description

gist -d "[description]" [file]

List your gists

gist -l

Update existing gist

gist -u [gist_id] [file]

Copy URL to clipboard

gist -c [file]

Open in browser

gist -o [file]

说明

gist creates and manages GitHub Gists from the command line. Gists provide a lightweight way to share code snippets, notes, and small files without creating a full repository. Each gist supports multiple files, syntax highlighting, version control, forking, and commenting. The tool requires authentication through a GitHub personal access token. Gists are private by default unless created with the -p flag. It integrates with the system clipboard and browser for streamlined workflows.

参数

-p, --public
Make public (default private).
-d, --description _text_
Gist description.
-l, --list _user_
List gists.
-u, --update _id_
Update existing gist.
-c, --copy
Copy URL to clipboard.
-o, --open
Open in browser.
-f, --filename _name_
Set filename.

FAQ

What is the gist command used for?

gist creates and manages GitHub Gists from the command line. Gists provide a lightweight way to share code snippets, notes, and small files without creating a full repository. Each gist supports multiple files, syntax highlighting, version control, forking, and commenting. The tool requires authentication through a GitHub personal access token. Gists are private by default unless created with the -p flag. It integrates with the system clipboard and browser for streamlined workflows.

How do I run a basic gist example?

Run `gist [file]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -p, --public do in gist?

Make public (default private).