Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

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

This comment has been minimized.

Copy link

@jiuks jiuks commented Mar 11, 2013

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

@jiuks

This comment has been minimized.

Copy link

@jiuks 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
You can’t perform that action at this time.