2017-05-29 12:02:09 -03:00
|
|
|
# gist
|
|
|
|
|
2024-03-29 23:11:22 +08: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 12:02:09 -03:00
|
|
|
|
2024-03-29 23:11:22 +08:00
|
|
|
- Log in to gist on this computer:
|
2017-08-25 19:53:33 +08:00
|
|
|
|
|
|
|
`gist --login`
|
|
|
|
|
2017-05-29 12:02:09 -03: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 03:41:30 -03:00
|
|
|
`gist --private --description "{{A meaningful description}}" {{file.txt}}`
|
2017-05-29 12:02:09 -03:00
|
|
|
|
2022-12-04 08:53:34 +01:00
|
|
|
- Read contents from `stdin` and create a gist from it:
|
2017-05-29 12:02:09 -03:00
|
|
|
|
|
|
|
`{{echo "hello world"}} | gist`
|
|
|
|
|
|
|
|
- List your public and private gists:
|
|
|
|
|
2021-04-02 18:59:30 +02:00
|
|
|
`gist --list`
|
2017-05-29 12:02:09 -03:00
|
|
|
|
2021-04-02 18:59:30 +02:00
|
|
|
- List all public gists for any user:
|
2017-08-25 19:53:33 +08:00
|
|
|
|
2021-04-02 18:59:30 +02:00
|
|
|
`gist --list {{username}}`
|
2017-08-25 19:53:33 +08:00
|
|
|
|
2021-08-15 19:59:09 +02:00
|
|
|
- Update a gist using the ID from URL:
|
2017-05-29 12:02:09 -03:00
|
|
|
|
2021-04-02 18:59:30 +02:00
|
|
|
`gist --update {{GIST_ID}} {{file.txt}}`
|