michaelpetri / php-git
Simple wrapper around git cli, based on symfony/process.
Installs: 5 886
Dependents: 1
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 4
Requires
- php: ~8.1.0 || ~8.2.0
- michaelpetri/php-generic-list: ^0.2.0
- symfony/process: ^6.2.7
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.15.1
- phpunit/phpunit: ^10.1.1
- roave/security-advisories: dev-latest
- vimeo/psalm: ^5.8.0
This package is auto-updated.
Last update: 2024-11-10 04:43:12 UTC
README
This package contains a php wrapper around the git cli, it is based on symfony/process and strictly typed.
Installation
composer require michaelpetri/php-git
Example
$file = File::from('/home/mpetri/PhpstormProjects/php-git/README.md'); $repository = new GitRepository( $file->directory, Directory::from('/home/mpetri/PhpstormProjects/php-git/.git'), Duration::inSeconds(60) ); $repository->add($file); $repository->commit('Initial commit')
See GitRepositoryInterface or Tests for an overview of all available methods.