Skip to content

Instantly share code, notes, and snippets.

@MarkTiedemann
Created August 17, 2017 12:25
Show Gist options
  • Save MarkTiedemann/35bebd739dbd0f3918d87f27bbcf9df1 to your computer and use it in GitHub Desktop.
Save MarkTiedemann/35bebd739dbd0f3918d87f27bbcf9df1 to your computer and use it in GitHub Desktop.
Git pull all subdirectories
ls -dir | % {
cd "$_"
write-host "~ $_" -foregroundcolor magenta
git pull
cd ..
}
<#
PS dir> .\pull-all.ps1
~ subdir1
Already up-to-date.
~ subdir2
Already up-to-date.
#>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment