Skip to content

Instantly share code, notes, and snippets.

@hymkor
Last active July 3, 2017 23:49
Show Gist options
  • Save hymkor/fe4a396807eff2c7f26e60a1a05999c2 to your computer and use it in GitHub Desktop.
Save hymkor/fe4a396807eff2c7f26e60a1a05999c2 to your computer and use it in GitHub Desktop.
Do `git status` on all repository where we did `git commit` recently
# $today = Get-Date -Format "yyyy-MM-dd"
$done = @{}
Join-Path $env:appdata 'NYAOS_ORG\nyagos.history' |
%{ Get-Content $_ -Encoding utf8 } |
?{ $_ -match '^[g]it commit' } |
%{
$private:tmp=($_ -split "`t")
# $private:from = (Get-Date).AddDays(-3).ToString("yyyy-MM-dd")
$private:dir=$tmp[1]
if( (Test-Path $dir) -and (-not $done.ContainsKey($dir)) ){
Write-Host $dir
pushd $dir
git status | ?{ $_ -match "^Your branch is" } | %{ " "+$_ }
popd
Write-Host
$done[ $dir ] = 1
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment