Skip to content

Instantly share code, notes, and snippets.

@agitso
Created February 26, 2013 15:33

Revisions

  1. agitso created this gist Feb 26, 2013.
    10 changes: 10 additions & 0 deletions rgst
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    #!/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";
    }
    }