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.

Setup should be fairly simple – just extract the tarball where you want to install it, copy config/gitphp.conf.php.example to config/gitphp.conf.php, and read through the file to set up your options (the comments should explain everything), and make the templates_c directory writeable by the webserver if it’s not already.  More detailed instructions are in the included README.

highly recommend reading through all the options in the config file – at an absolute minimum the projectroot path is required and the path to smarty has to be correct.  Most of the other options are turned off by default to allow you to just drop it in and go, but without turning them on and setting them up, you won’t have access to syntax highlighting, categories, caching, etc.

Note: if you’re upgrading your existing gitphp.conf.php will not be overwritten, but I recommend checking gitphp.conf.php.example for new configuration options that may have been added.

Bugs and enhancement requests can be posted on Mantis.

NOTE: this is not the same git-php project that is posted at http://code.google.com/p/git-php/, which hasn’t been updated since 2007.

Changelog

  • 20091110 – 0.1.0
    • Security fix: prevent directory traversal using project path
    • Support displaying project clone/push urls
  • 20091024 – 0.0.9
    • PHP 5.3 fixes – Patch from Khee Chin
    • Project description on front page project list links to project page – Patch from Khee Chin
    • Packed ref support – Based on work by Khee Chin
    • Fixed display of non-english UTF-8 characters
    • Disabled smarty’s compile check for production releases, for a small performance boost
  • 20090725 – 0.0.8
    • Caching
    • Unified templates
    • Debugging/benchmarking
    • Fix log/shortlog/search with git versions less than 1.5.0
    • Fix blob page not displaying ref tags for HEAD
    • Preserve whitespace for readability of non-html pages
    • Use utf-8 charset
    • Avoid large snapshots getting truncated to the output buffer size
  • 20090703 – 0.0.7
    • Readable names in diffs (I only changed these in some places in the last release, but missed other places)
    • The current path in treeview now has links to each directory, so you can jump to any parent directory easily
    • Ref icons now appear next to commit titles in more places
  • 20090519 – 0.0.6
    • Mime type support, to display images inline
    • Searching of commit logs, authors, committers, filenames, and file contents
    • Blob diffs show the filenames instead of the hashes to be more readable
    • Fixed blank entries that appeared at the end of the log/shortlog
    • Added a link to the tree from the main project list
    • Some performance fixes for projects with many commits
    • Snapshots can be sent as tar.gz or zip
    • templates_c directory created already
    • Single tag view page
  • 20080610 – 0.0.5
    • Move config to its own dir
    • Break up function library into a file for each function that’s loaded on demand
    • Use a more sane versioning scheme (e.g. 0.0.4 instead of v01d)
    • Fix broken snapshot URL on some pages
    • Fix missing header that broke formatting on tag page
    • Fix duplicated “…” that appeared on truncated shortlogs
    • Fix sorting functions on main project list page
    • Project lists searching a directory (rather than using a predefined list in the config) now search recursively
    • Add “TXT” plaintext project list link on front page
    • Fix ref icons next to commits with tags/heads
    • Some adjustments to links on pages to match more closely with current gitweb
    • Links to files on commitdiff pages now work
    • Diff binary path is now configurable
    • Now works on Windows with msysgit! Thanks to testing and bugfixes from Slash
  • 20060814 – v01d:
    • Fix bug preventing snapshots from working
  • 20060513 – v01c:
    • Initial release

Download

Older versions

Smoking Blue Child Theme by Altamente Decorativo | built on Thematic Framework
Scroll to top