use TQ\Git\Repository\Repository; // open an already initialized repository $git = Repository::open('/path/to/your/repository', '/usr/bin/git'); // open repository and create path and init repository if necessary $git = Repository::open('/path/to/your/repository', '/usr/bin/git', 0755); // get current branch $branch = $git->getCurrentBranch(); // get status of working directory $status = $git->get