tldr/pages/common/gist.md

33 lines
653 B
Markdown
Raw Permalink Normal View History

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