2017-05-29 16:02:09 +01:00
|
|
|
# gist
|
|
|
|
|
2024-03-29 15:11:22 +00:00
|
|
|
> Upload code to <https://gist.github.com>.
|
2019-06-07 11:58:24 +01:00
|
|
|
> More information: <https://github.com/defunkt/gist>.
|
2017-05-29 16:02:09 +01:00
|
|
|
|
2024-03-29 15:11:22 +00:00
|
|
|
- Log in to gist on this computer:
|
2017-08-25 12:53:33 +01:00
|
|
|
|
|
|
|
`gist --login`
|
|
|
|
|
2017-05-29 16:02:09 +01:00
|
|
|
- Create a gist from any number of text files:
|
|
|
|
|
|
|
|
`gist {{file.txt}} {{file2.txt}}`
|
|
|
|
|
|
|
|
- Create a private gist with a description:
|
|
|
|
|
2023-12-27 06:41:30 +00:00
|
|
|
`gist --private --description "{{A meaningful description}}" {{file.txt}}`
|
2017-05-29 16:02:09 +01:00
|
|
|
|
2022-12-04 07:53:34 +00:00
|
|
|
- Read contents from `stdin` and create a gist from it:
|
2017-05-29 16:02:09 +01:00
|
|
|
|
|
|
|
`{{echo "hello world"}} | gist`
|
|
|
|
|
|
|
|
- List your public and private gists:
|
|
|
|
|
2021-04-02 17:59:30 +01:00
|
|
|
`gist --list`
|
2017-05-29 16:02:09 +01:00
|
|
|
|
2021-04-02 17:59:30 +01:00
|
|
|
- List all public gists for any user:
|
2017-08-25 12:53:33 +01:00
|
|
|
|
2021-04-02 17:59:30 +01:00
|
|
|
`gist --list {{username}}`
|
2017-08-25 12:53:33 +01:00
|
|
|
|
2021-08-15 18:59:09 +01:00
|
|
|
- Update a gist using the ID from URL:
|
2017-05-29 16:02:09 +01:00
|
|
|
|
2021-04-02 17:59:30 +01:00
|
|
|
`gist --update {{GIST_ID}} {{file.txt}}`
|