1. Go to this page and download the library: Download directorytree/git library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
directorytree / git example snippets
// The current working directory:
chdir(getcwd());
// A specific directory:
chdir('/usr/sbin/httpd');
use DirectoryTree\Git\Git;
$git = new Git($remote = 'origin');
$git = new Git();
$successful = $git->pull('master');
$successful = $git->pull('v1.0.1');