Skip to content

Instantly share code, notes, and snippets.

@Bak-Jin-Hyeong
Created November 20, 2019 08:06
Show Gist options
  • Save Bak-Jin-Hyeong/fd43a38ed1aa7cc6bcff011946e7bdf1 to your computer and use it in GitHub Desktop.
Save Bak-Jin-Hyeong/fd43a38ed1aa7cc6bcff011946e7bdf1 to your computer and use it in GitHub Desktop.
$invocation = (Get-Variable MyInvocation).Value
$invocationDir = Split-Path $invocation.MyCommand.Path
Get-ChildItem $invocationDir | ForEach-Object {
$p = (Join-Path -Path $_.FullName -ChildPath '.git')
if (Test-Path -Path $p) {
Write-Host "git --git-dir="${p}" fetch --prune --all"
git --git-dir="${p}" fetch --prune --all
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment