Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
automatically update git repositories
#change your github location
$github_directory = "C:\Users\galexiou\Documents\GitHub"
Get-ChildItem $github_directory | ForEach-Object {
if($_.Attributes -eq "Directory")
{
Write-Host $_.FullName
Set-Location $_.FullName
git fetch
git pull
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment