Skip to content

Commit

Permalink
Making the README a bit more explanatory
Browse files Browse the repository at this point in the history
  • Loading branch information
pklaus committed Jul 2, 2013
1 parent 4f60414 commit f395b95
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions README.md
@@ -1,6 +1,15 @@
Backs up your public and private gists to a given directory as full git repositories. If the directories already exist, the gist repos will be updated. At the moment it's nothing more than a simple shell script. It probably breaks if you have a lot of gists. Also, watch out for rate limiting.
### gist-backup – Creates a backup of all your gist repos

Because this script backs up your private repos, not just your public ones, you'll need to generate an OAuth token (which has write access to your gists -- this script does not use the write access!):
This Bash script backs up your public and private gists to a given directory as git repositories including the full revision history.
If the directories already exist, the gist repos will be updated.
It's all implemented as a simple Bash script.
It probably breaks if you have a lot of gists. Also, watch out for rate limiting.

#### Setup

Because this script backs up your private repos, not just your public ones, you'll need to generate an OAuth token.
This will also include write access to your gists although the script does not use it!
Here is how you can request the API token:

$ curl -u github-user-name:github-password \
-H "Content-Type: application/json" \
Expand All @@ -16,4 +25,16 @@ Take the token given in the response and set it in your git config as `github.gi

You can revoke this token at any time by visiting <https://github.com/settings/applications>.

#### Usage

When you have set the gist token as described above, you can start backing up all your gists using the following command:

$ ./gist-backup ~/gist-backups

This will clone all gist repositories to the local folder `~/gist-backups`.

When you call the script again, it will simply update the repos (pull changes) if they exist already.

#### Copyright & License

Copyright (C) 2012, Adam Prescott, licensed under the MIT license. See LICENSE.

0 comments on commit f395b95

Please sign in to comment.