Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Pull all git projects
$gitUser = @(
# clear screen
$gitUser | ForEach-Object {
$userName = (Get-Item $_).Name
# get repos for each git user
Get-ChildItem $_ | ForEach-Object {
$repoName = $_.Name
Write-Host "Run git pull for $userName / $repoName"
cd $_.FullName
& git fetch --all
& git reset --hard origin/master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment