PHPackages                             shadiakiki1986/git-rest-api-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. shadiakiki1986/git-rest-api-client

ActiveLibrary[HTTP &amp; Networking](/categories/http)

shadiakiki1986/git-rest-api-client
==================================

A php client interfacing with the rest api from node-git-rest-api

0.0.14(9y ago)0875↑2900%1[1 issues](https://github.com/shadiakiki1986/git-rest-api-client-php/issues)1MITPHPPHP ^5.5 || ^7.0

Since Nov 18Pushed 9y ago1 watchersCompare

[ Source](https://github.com/shadiakiki1986/git-rest-api-client-php)[ Packagist](https://packagist.org/packages/shadiakiki1986/git-rest-api-client)[ Docs](https://github.com/shadiakiki1986/git-rest-api-client-php)[ RSS](/packages/shadiakiki1986-git-rest-api-client/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (3)Versions (18)Used By (1)

git-rest-api-client-php
=======================

[](#git-rest-api-client-php)

[![Build Status](https://camo.githubusercontent.com/72bc26aaadf06c78eca9e49f52b2cac5cc28562c5d4e299244e88ddf003bbf08/68747470733a2f2f7472617669732d63692e6f72672f7368616469616b696b69313938362f6769742d726573742d6170692d636c69656e742d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/shadiakiki1986/git-rest-api-client-php)

PHP client interfacing with RESTful API from server running [node-git-rest-api](https://github.com/korya/node-git-rest-api), as dockerized in [docker-node-git-rest-api](https://github.com/shadiakiki1986/docker-node-git-rest-api)

### Install

[](#install)

Published on [packagist](https://packagist.org/packages/shadiakiki1986/git-rest-api-client)

```
composer require shadiakiki1986/git-rest-api-client
```

### Use

[](#use)

Launch a `node-git-rest-api` server

```
docker run -p 8081:8081 -it shadiakiki1986/docker-node-git-rest-api
```

To make changes to a file in a repository

```
$git        = new GitRestApi\Client('http://localhost:8081');
// clone a git repository on github
$remote = 'https://USERNAME:PASSWORD@github.com/shadiakiki1986/git-data-repo-testDataRepo';
$repo = $git->cloneRemote($remote);
// update a file called 'filename' in the repository
$repo->put('filename','some content');
// commit the changes
$repo->commit('a new commit message');
// push to the remote
$repo->push();
```

To pull changes and get contents of a file

```
$git        = new GitRestApi\Client();
// get already-cloned git repository
$repo = $git->get('git-data-repo-testDataRepo');
// pull changes
$repo->pull();
// get contents of file
$repo->get('filename');
```

Testing locally
---------------

[](#testing-locally)

' VERY IMPORTANT NOTE: Do NOT directly run `node-git-rest-api` on your local machine and test this package against it. The tests contain a few `git config --global ...` calls, which would change your username/email on your local machine, and hence screwing up your git commits in all other repositories. '

Launch a `node-git-rest-api` server

```
docker run -p 8081:8081 -it shadiakiki1986/docker-node-git-rest-api
```

`composer test` will test everything except a successful push.

```
export GitRestApiTestUrl=https://shadiakiki1986:veggiepizza@github.com/shadiakiki1986/git-data-repo-testDataRepo
composer test

```

will test everything, including the successful push.

For testing against my own bitbucket private repo:

```
PRIVATE_REMOTE=https://myusername:mypassword@bitbucket.org/shadiakiki1986/ffa-bdlreports-maps/ PRIVATE_FILE=filename vendor/bin/phpunit tests/GitRestApi/PrivateTest.php

```

Testing on travis
-----------------

[](#testing-on-travis)

Check [git-data-repo](https://github.com/shadiakiki1986/git-data-repo)

TODO
----

[](#todo)

2016-11-19

- push is not pushing to github
- travis not passing

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~3 days

Total

17

Last Release

3404d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2cc997a8672e96aaee90c8555b7e5bc9693894e74c7530abf2216ee6799357ff?d=identicon)[shadiakiki1986](/maintainers/shadiakiki1986)

---

Top Contributors

[![shadiakiki1986](https://avatars.githubusercontent.com/u/8392324?v=4)](https://github.com/shadiakiki1986 "shadiakiki1986 (36 commits)")

---

Tags

apiclientrestgit

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/shadiakiki1986-git-rest-api-client/health.svg)

```
[![Health](https://phpackages.com/badges/shadiakiki1986-git-rest-api-client/health.svg)](https://phpackages.com/packages/shadiakiki1986-git-rest-api-client)
```

###  Alternatives

[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69114.3k](/packages/serpapi-google-search-results-php)[artesaos/laravel-linkedin

Linkedin API integration for Laravel and Lumen 5

5666.5k](/packages/artesaos-laravel-linkedin)[bninja/restful

Library for writing RESTful PHP clients.

1451.5k](/packages/bninja-restful)[ismaeltoe/osms

PHP library wrapper of the Orange SMS API.

4540.0k](/packages/ismaeltoe-osms)[romanpitak/dotmailer-api-v2-client

Client library for the dotMailer v2 (REST) API.

21101.0k2](/packages/romanpitak-dotmailer-api-v2-client)[jsor/hal-client

A lightweight client for consuming and manipulating Hypertext Application Language (HAL) resources.

2425.9k1](/packages/jsor-hal-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
