Skip to content

Instantly share code, notes, and snippets.

@aclk
Last active August 7, 2021 08:21
Show Gist options
  • Save aclk/af75c7d417eaab8e4cd16e37c7c48968 to your computer and use it in GitHub Desktop.
Save aclk/af75c7d417eaab8e4cd16e37c7c48968 to your computer and use it in GitHub Desktop.

Revisions

  1. aclk revised this gist Aug 7, 2021. No changes.
  2. aclk created this gist Aug 7, 2021.
    9 changes: 9 additions & 0 deletions git-clone.ps1
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    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() }
    }