Skip to content

Instantly share code, notes, and snippets.

@KaiWalter
Created June 9, 2016 05:57
Show Gist options
  • Save KaiWalter/02a677d38cc753bf1dffe49e7a5105b5 to your computer and use it in GitHub Desktop.
Save KaiWalter/02a677d38cc753bf1dffe49e7a5105b5 to your computer and use it in GitHub Desktop.
PowerShell script to pull for all subdirectories
Get-ChildItem -Directory | ForEach {
Write-Host "PULLING" $_.name
Push-Location
Set-Location $_.name
git pull
if($LastExitCode)
{
Pop-Location
Exit -1
}
Pop-Location
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment