2025-03-14 21:59:59 -06:00
|
|
|
# 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 create {{path/to/file1 path/to/file2 ...}}`
|
|
|
|
|
|
|
|
|
|
- Create a new Gist with a specific [desc]ription:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`gh gist create {{path/to/file1 path/to/file2 ...}} {{[-d|--desc]}} "{{description}}"`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Edit a Gist:
|
|
|
|
|
|
|
|
|
|
`gh gist edit {{id|url}}`
|
|
|
|
|
|
|
|
|
|
- List up to 42 Gists owned by the currently logged in user:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`gh gist list {{[-L|--limit]}} {{42}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- View a Gist in the default browser without rendering Markdown:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`gh gist view {{id|url}} {{[-w|--web]}} {{[-r|--raw]}}`
|