An open API service indexing awesome lists of open source software.

https://github.com/pulyaevskiy/phink

Phink is a PHP client for Git
https://github.com/pulyaevskiy/phink

Last synced: 3 months ago
JSON representation

Phink is a PHP client for Git

Awesome Lists containing this project

README

        

Phink
=====

*There will be no further development of this library. But I'll keep this repository for history's sake and maybe someone else who'd find it interesting to continue this work.*

Phink is a PHP library intended to help developers when working with Git from PHP.

The Phink has started as private project and currently is in early development stage so it doesn't do much.
However there is a bunch of already implemented git commands like: init, clone, add, checkout, pull.

Usage
=====

You can require Phink as a dependency in composer.json of your project.
Currently there is no stable release of the library available yet. However you can refer to the master branch using version 1.0.* (thanks to Composer branch-alias feature).
So when actual 1.0 version will be released you won't need to change anything on your side. Example:
```json
{
"require": {
"phink/phink": "1.0.*"
}
}
```

Then just start with creating instance of Phink\Repository class:
```php
use Phink\Repository;

$repo = new Repository($pathToRepository);

// If you need to initialize new repository:
$repo
->init()
->execute();

// Stage files:
$repo
->add()
->filePattern('.')
->execute();

// Pull changes:
$repo->pull()
->from('origin', 'master')
->execute();

// And so on...
```

License
=====

This library is under MIT license. Please see the complete license in the LICENSE file provided with library source code.