Skip to content

Instantly share code, notes, and snippets.

@wrossmck
Created June 11, 2018 07:27
Show Gist options
  • Save wrossmck/dccfbf67b615642b1fce01731f4b0686 to your computer and use it in GitHub Desktop.
Save wrossmck/dccfbf67b615642b1fce01731f4b0686 to your computer and use it in GitHub Desktop.
pull latest from master in all subdirectories
Get-ChildItem -Recurse -Directory -Hidden -Filter .git | ForEach-Object { & git --git-dir="$($_.FullName)" --work-tree="$(Split-Path $_.FullName -Parent)" pull origin master }
@wrossmck
Copy link
Author

Gets all folders with a .git folder in it (indicates a git repository), and executes git pull origin master for that repository

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment