5

Recently I was doing a project in which I had to provide a web interface for git repositories in my system. I was Coding in PHP and am looking for a way to connect PHP to Git ie, to provide a PHP front end to git.

But can't find any libraries or references to proceed.

1

3 Answers 3

6

Have you looked at Git-PHP? http://code.google.com/p/git-php/

There is also:

glip

glip, a git library in PHP, enables your PHP scripts to access git repositories. Written in pure PHP5, it works without even having git installed, thus making it the ideal git library to use with your el-cheapo web hosting service.

GitPHP

GitPHP is a web frontend for git repositories. It emulates the look of standard gitweb, but is written in PHP and makes use of Smarty templates for customization. It has a couple extras, including syntax highlighting through the GeSHi PHP class and project category support. It works with standard git as well as msysgit on Windows.

Sign up to request clarification or add additional context in comments.

2 Comments

The links from that page seem to be dead.
Look at the source code on the google project: code.google.com/p/git-php/source/browse/trunk/git.php
2

For those visiting this page in 2021, here is a currently active Git-PHP package (with tests) that you can use to perform common Git operations from PHP.

https://github.com/czproject/git-php

Comments

1

I know this is old but I got here from Google and maybe this will help others. I found but did not test yet:

https://packagist.org/packages/sebastian/git

or https://github.com/sebastianbergmann/git

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.