Last active
August 28, 2023 18:24
-
-
Save marhensa/a6ac876912022a6cafbe8df276bcafbb to your computer and use it in GitHub Desktop.
PowerShell - git pull for all directories (update all repository folders)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-ChildItem -Directory -Force -Recurse -Filter ".git" -Depth 1 | ForEach-Object {$currentLocation = Get-Location; Set-Location -Path $_.Parent.FullName; Write-Host $_.Parent.FullName; git pull; Set-Location -Path $currentLocation} | |
# make sure to run it on the folder that have all those repositories that needs to be updated |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
to make an alias, so it could be run in a single simple command:
gitpullall