Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Integralist/090fb5d3b55694c7b92d32798845eded to your computer and use it in GitHub Desktop.
Save Integralist/090fb5d3b55694c7b92d32798845eded to your computer and use it in GitHub Desktop.
Backup all your GitHub Gists (inc. private gists)

Instructions

...now sit and wait for it to start cloning all your gists into the specified directory

Use ls -l | wc -l to count how many gists you have

Caveats

The cloned gists are placed inside folders named after the gist ID so it's not exactly clear what a folder is.

You can obviously try and search through your gists using something like:

function search_gists(){
  local search=*$1*
  find . -name $search
}

search_gists docker
search_gists aws

But remember that this is for local backups and not a replacement for GitHub's Gist service

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