-
-
Save styk-tv/ef1311e73dc6bc9c724544c1a0d9d05c to your computer and use it in GitHub Desktop.
recursive git status
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
#!/usr/bin/php | |
<?php | |
$repos = array(); | |
exec('find -type d -name .git | sed -e "s/\.git//"', $repos); | |
foreach ($repos as $repo) { | |
$status = shell_exec("cd $repo && git status"); | |
if (false == strpos($status, 'nothing to commit (working directory clean)')) { | |
echo "$repo\n" . str_repeat('-', strlen($repo)) . "\n$status\n\n"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment