Skip to content

Instantly share code, notes, and snippets.

@jbott
Created October 12, 2015 13:48
Show Gist options
  • Save jbott/f3609b97c26347c528bf to your computer and use it in GitHub Desktop.
Save jbott/f3609b97c26347c528bf to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# How this works:
# Curl -> Grabs the organization repos from the github api
# grep -> Filter to only clone_url's
# grep -> Select the url from that line
# xargs -> For each line, run git clone [line]
curl -s "https://api.github.com/orgs/${1}/repos?per_page=200" | grep clone_url | grep -oh "https.*git" | xargs -L1 git clone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment