Git PHP
September 19th, 2006 by ZackRecently I’ve been working on a PHP based web front-end to the git source control system. This is mostly because of a recurring need I had for viewing git repositories in PHP based web pages. The goal of this small project is a PHP web interface that is easily extensible and embeddable. For instance, at work we use the e107 open source content management system. It is written in PHP and has a plug-in system. Using my git-php script it was easy to make a git repository viewer plug-in for e107 without modifying the git-php script itself. I only had to handle the plug-in events and actions and “include” the git-php script. Hopefully, one would be able to embed git-php in any PHP based page whether it be a CMS (Drupal, MediaWiki, e107, etc), a custom PHP site like mine or even a Wordpress plug-in! In fact I’d like to start picking them off the git wishlist.
I modeled the functionality and default look after gitweb.cgi, the popular, community backed Perl git web front end. I like a lot of things about gitweb.cgi and some not so much. I want to take the good from it and add things that I and others would like to see in a source repository viewer. However, the style is pretty straight forward and by adding a style.css file in the same directory as the git-php script, the interface will adopt that theme.
I really hope someone besides me gets some use out of this little project!
Homepage: http://code.google.com/p/git-php/
Demo: http://zackb.org/git-php/git.php/
E107 plug-in: http://zackb.org/e107/e107_plugins/e107_git/e107_git.php






