HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

gh gist — Work with GitHub Gists. More information: <https://cli.github.com/manual/gh_gist>.

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandgh gistgithubgistscliwithmorework

Problem

How to use the gh gist command: Work with GitHub Gists. More information: <https://cli.github.com/manual/gh_gist>.

Solution

gh gist — Work with GitHub Gists. More information: <https://cli.github.com/manual/gh_gist>.

Create a new Gist from one or more files:
gh gist {{[new|create]}} {{path/to/file1 path/to/file2 ...}}


Create a new Gist with a specific [desc]ription:
gh gist {{[new|create]}} {{path/to/file1 path/to/file2 ...}} {{[-d|--desc]}} "{{description}}"


Edit a Gist:
gh gist edit {{id|url}}


List up to 42 Gists owned by the currently logged in user:
gh gist {{[ls|list]}} {{[-L|--limit]}} 42


View a Gist in the default browser without rendering Markdown:
gh gist view {{id|url}} {{[-w|--web]}} {{[-r|--raw]}}

Code Snippets

Create a new Gist from one or more files

gh gist {{[new|create]}} {{path/to/file1 path/to/file2 ...}}

Create a new Gist with a specific [desc]ription

gh gist {{[new|create]}} {{path/to/file1 path/to/file2 ...}} {{[-d|--desc]}} "{{description}}"

Edit a Gist

gh gist edit {{id|url}}

List up to 42 Gists owned by the currently logged in user

gh gist {{[ls|list]}} {{[-L|--limit]}} 42

View a Gist in the default browser without rendering Markdown

gh gist view {{id|url}} {{[-w|--web]}} {{[-r|--raw]}}

Context

tldr-pages: common/gh gist

Revisions (0)

No revisions yet.