tldr/pages/common/gh-gist.md

25 lines
603 B
Markdown
Raw Normal View History

2020-11-06 11:02:47 +00:00
# gh gist
> Work with GitHub Gists on the command-line.
2020-11-06 11:02:47 +00:00
> More information: <https://cli.github.com/manual/gh_gist>.
- Create a new Gist from a space-separated list of files:
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`