Skip to content

Instantly share code, notes, and snippets.

@nclsHart
Forked from dbu/git-status-recursive
Last active December 27, 2015 16:49
Show Gist options
  • Save nclsHart/7358100 to your computer and use it in GitHub Desktop.
Save nclsHart/7358100 to your computer and use it in GitHub Desktop.
#!/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