Skip to content

Instantly share code, notes, and snippets.

@rmoff
Created March 11, 2013 14:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rmoff/5134715 to your computer and use it in GitHub Desktop.
Save rmoff/5134715 to your computer and use it in GitHub Desktop.

Gists are a feature of git, and a nice way to share snippets of code or short documents. They benefit from being private or public, and can be cloned etc like standard git repositories.

To post a git from the command line there is a tool available called gist, installed with brew:

brew install gist

Then set your git username + password:

git config --global github.user "jbloggs"
git config --global github.password "welcome1"

Then pass gist the content to post, either on stdin or as a file:

gist filetopost.sh
@jiuks
Copy link

jiuks commented Mar 11, 2013

Does the Gist automatically pick up the type of file (i.e. Shell, Markdown etc)?

@jiuks
Copy link

jiuks commented Mar 11, 2013

Aha - I've just looked at your revisions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment