Skip to content

Instantly share code, notes, and snippets.

Last active Dec 15, 2016
What would you like to do?
Batch Clone

This script will batch clone all repos retrieved from a RESOURCEURL into the current directory that you're in.

This will prompt you for your github password.

Example Resource URLS:[ORGNAME]/repos?page=[PAGENUMBER]

I recommend storing this as a zsh or bash alias (i.e batch-clone ($1)) where $1 is the RESOURCE URL

curl -u[USERNAMEHERE] -s [RESOURCEURL] | ruby -rjson -e 'JSON.load( {|repo| %x[git clone #{repo["url"]} ]}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment