Skip to content

Instantly share code, notes, and snippets.

@benjaminoakes
Created June 5, 2019 17:03
Show Gist options
  • Save benjaminoakes/35e5605ad4df5881edff0e8eec098f73 to your computer and use it in GitHub Desktop.
Save benjaminoakes/35e5605ad4df5881edff0e8eec098f73 to your computer and use it in GitHub Desktop.
Clone my gists
gist_urls_file=$(mktemp)
gist -l | sed 's/ .*$//' > $gist_urls_file
cat $gist_urls_file | while read -r line; do
gist_url="$line"
gist_id="$(echo $gist_url | sed 's|https://gist.github.com/||')"
clone_url="git@gist.github.com:$gist_id.git"
git clone $clone_url
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment