Last active
February 28, 2022 08:53
-
-
Save geralexgr/f932d1126af5ba1dc4f9797218dd6e97 to your computer and use it in GitHub Desktop.
automatically update 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
#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