Giter Club home page Giter Club logo

gistup's Introduction

Gistup

Create a gist from the command line! Then just use git to update it.

For more, read the tutorial: Let’s Make a Block.

Installation

npm install -g gistup

The first time you run gistup, you’ll be prompted to create a GitHub personal access token. You can revoke the token in the future from your GitHub developer settings.

Usage

To upload all files in the current directory to your new gist:

gistup

If you just want to create a gist from a single file, try this instead:

gistup index.html

If you specify any options, such as a private gist, you must separate files from options with a double-dash (--) like this:

gistup --private -- index.html

If you want to update your gist later, just use git:

edit index.html
git commit -m 'Made some awesome changes.'
git push

Gistup works with binary files, too!

Arguments:

  • --description, -m - provide an optional description
  • --interactive, -i - request confirmation of every file before adding
  • --exclude, -x - skip files matching pattern; may use wildcards
  • --private, --no-public - make a secret gist
  • --open [url] - specify the URL to open after creating the gist
  • --no-open - don’t open the created gist in your web browser when done
  • --remote - specify the name of the git remote
  • --help - show some help
  • --version - print the current version of gistup

Gistup comes bundled with two helper programs: gistup-rename and gistup-open. Use gistup-rename "description of gist" to update the description of the gist in the current directory and gistup-open to open it for viewing in your default browser.

Troubleshooting

If you see the following error:

Error: Command failed: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

You probably need to generate your SSH keys for GitHub. These keys give you permission to git push to your repositories, including Gists.

If you’re unable to follow the first-time setup to create a personal access token, you can create a new access token by hand. The only required permission is "gist". You can then create a .gistup.json file in your home directory, with the following contents:

{
  "token": "0123456789012345678901234567890123456789"
}

Replace the numbers 0123456789… with your access token and save.

gistup's People

Contributors

mbostock avatar ajcrites avatar ecgan avatar joyrexus avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.