Last active
October 6, 2016 11:35
-
-
Save unjello/a658742a802b2c7a0c18d78927f83fa3 to your computer and use it in GitHub Desktop.
Git clone all repositories of a user
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Unj-GitCloneAllBy($User, $Proxy = $null) { | |
(curl -Proxy $Proxy "https://api.github.com/users/$User/repos?page=1&per_page=100").Content | |
| ConvertFrom-Json | |
| %{ $_.clone_url } | |
# workaround git printing to stderr by @wekempf aka William Kempf | |
# https://github.com/dahlbyk/posh-git/issues/109#issuecomment-21638678 | |
| %{ & git clone $_ 2>&1 } | |
| % { $_.ToString() } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment