Gitlib
Gitlib stats
- Downloads
- 10.8M
- Stars
- 442
- Open Issues
- 20
- Forks
- 69
Library for accessing git
Gitlib for Gitonomy - Laravel Package
Gitlib for Gitonomy is a PHP library designed to provide developers with methods to interact with Git repositories. It is suitable for PHP versions 5.6 and above. While it operates through shell calls and may not be the fastest solution, it offers convenience and simplicity for accessing Git functionalities.
Main Features:
- Easy Installation: Installable via Composer, making it straightforward to integrate with your projects.
- Comprehensive API: The library covers a wide range of Git operations such as commits, branches, diffs, logs, and more.
- Enterprise Support: Available support through the Tidelift Subscription, ensuring enterprise-level maintenance and support.
Installation:
To install Gitlib, use Composer:
composer require gitonomy/gitlib
Or manually update your composer.json:
{ "require": { "gitonomy/gitlib": "^1.3" }}
Example Usage:
<?phpuse Gitonomy\Git\Repository; $repository = new Repository('/path/to/repository'); foreach ($repository->getReferences()->getBranches() as $branch) { echo '- '.$branch->getName().PHP_EOL;} $repository->run('fetch', ['--all']);
Documentation:
The package provides detailed API documentation for various aspects of Git handling:
- Admin, Blame, Blob, Branch, Commit, Diff, Hooks, Log, References, Repository, Revision, Tree, Working Copy.
Notable Details:
- The library makes direct shell calls for Git operations.
- It supports PHP 5.6 and newer versions.
- Ideal for developers looking for an easy-to-use Git management solution within their PHP applications.
For more information and professional support, consider the Tidelift Subscription which aids in maintaining the health and security of the package and its dependencies.