1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/gh-gist.md

25 lines
605 B
Markdown
Raw Normal View History

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