2020-11-06 11:02:47 +00:00
|
|
|
# gh gist
|
|
|
|
|
2023-07-16 18:23:40 +01:00
|
|
|
> Work with GitHub Gists.
|
2020-11-06 11:02:47 +00:00
|
|
|
> More information: <https://cli.github.com/manual/gh_gist>.
|
|
|
|
|
2024-01-31 03:55:19 +00:00
|
|
|
- Create a new Gist from one or more files:
|
2020-11-06 11:02:47 +00:00
|
|
|
|
2023-05-02 16:33:56 +01:00
|
|
|
`gh gist create {{path/to/file1 path/to/file2 ...}}`
|
2020-11-06 11:02:47 +00:00
|
|
|
|
2023-05-02 16:33:56 +01:00
|
|
|
- Create a new Gist with a specific [desc]ription:
|
2020-11-06 11:02:47 +00:00
|
|
|
|
2023-05-02 16:33:56 +01:00
|
|
|
`gh gist create {{path/to/file1 path/to/file2 ...}} --desc "{{description}}"`
|
2020-11-06 11:02:47 +00:00
|
|
|
|
|
|
|
- Edit a Gist:
|
|
|
|
|
2023-05-02 16:33:56 +01:00
|
|
|
`gh gist edit {{id|url}}`
|
2020-11-06 11:02:47 +00:00
|
|
|
|
2023-05-02 16:33:56 +01:00
|
|
|
- List up to 42 Gists owned by the currently logged in user:
|
2020-11-06 11:02:47 +00:00
|
|
|
|
2023-05-02 16:33:56 +01:00
|
|
|
`gh gist list --limit {{42}}`
|
2020-11-06 11:02:47 +00:00
|
|
|
|
2020-12-29 11:45:05 +00:00
|
|
|
- View a Gist in the default browser without rendering Markdown:
|
2020-11-06 11:02:47 +00:00
|
|
|
|
2023-05-02 16:33:56 +01:00
|
|
|
`gh gist view {{id|url}} --web --raw`
|