Using the gist command-line tool called gist that simplifies interacting with Gists, including downloading them.
1. Install the gist tool:
macOS (with Homebrew):
brew install gistLinux (or manually for other OS): You might need to install Ruby and RubyGems first if you don't have them. Bash
gem install gistYou might need sudo before gem install gist depending on your system's Ruby setup.
2. Authenticate gist with your GitHub account:
gist --loginThis will prompt you for your GitHub username and password, then generate an API token for gist to use.
3. Create a directory to store your Gists:
mkdir gist_archive
cd gist_archive4. Download all your Gists:
for repo in $(gist -l | awk '{ print $1 }'); do git clone $repo 2> /dev/null; done