Last active
July 3, 2017 23:49
-
-
Save hymkor/fe4a396807eff2c7f26e60a1a05999c2 to your computer and use it in GitHub Desktop.
Do `git status` on all repository where we did `git commit` recently
This file contains hidden or 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
# $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