Created
August 30, 2011 06:41
-
-
Save jonnybest/1180336 to your computer and use it in GitHub Desktop.
Powershell update script for multiple git repositories
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
$git = $env:programfiles+"\Git\cmd\git.cmd"; | |
if (!$git) { | |
Write-Host "Something went wrong. | |
Please enter the path to git.cmd or git.exe:"; | |
$git = Read-Host; | |
Set-Variable -Name git -Value $git; | |
} | |
ls -name -Exclude *.* | foreach {cd .\$_ ; .$git pull origin master ; cd ..} | |
Write-Host "Done."; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment