« Back to Index

Backup all your GitHub Gists (inc. private gists)

View original Gist on GitHub

Backup all your GitHub Gists (inc. private gists).md

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