Skip to content

Instantly share code, notes, and snippets.

@JonasGao
Created November 24, 2019 03:31
Show Gist options
  • Save JonasGao/e4a463c08492139f9de74d8b4eddb3e3 to your computer and use it in GitHub Desktop.
Save JonasGao/e4a463c08492139f9de74d8b4eddb3e3 to your computer and use it in GitHub Desktop.
param(
[string]$Target
)
Get-ChildItem $Target -Directory | ForEach-Object {
$gitDir = ("{0}\.git" -f $_.FullName)
if (Test-Path $gitDir -PathType Container) {
Push-Location $_
Write-Output ("{0} -> {1}" -f $_.FullName, (git config --get remote.origin.url))
Pop-Location
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment