Skip to content

Instantly share code, notes, and snippets.

@geeknam
Created April 16, 2011 17:20
Show Gist options
  • Save geeknam/923311 to your computer and use it in GitHub Desktop.
Save geeknam/923311 to your computer and use it in GitHub Desktop.
Executes 'git pull' in all directories
<?php
/* Author: Ngo Minh Nam */
$dirs = array_filter(glob(dirname(__FILE__)."/*"), 'is_dir');
print_r($dirs);
foreach($dirs as $dir){
chdir($dir);
$output = shell_exec('git pull');
echo $output;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment