1. Joachim Werner
  2. php-git-bundle

Overview

HTTPS SSH

Overview

php-git-bundle is a small PHP application to patch web applications on a shared host using Git bundles.

Using Git is nice if you have a console (e.g. via SSH) available, but on shared web hosters somethimes you don't have one.

But perhaps you can run console commands via PHP?

Install

Get a copy of php-git-bundle, e.g.

git clone https://bitbucket.org/jwerner/php-git-bundle.git

Check the settings in index.php:

// Projects directory:
$baseDir    = preparePath(dirname(__FILE__).'/../..');
// Git Bundles directory:
$bundlesDir = preparePath(dirname(__FILE__).'/../../git-bundles');

// *** Tools **
// Linux:
$gitExe = "git"; 
$tarExe = "tar";

Upload the php-git-bundle to your webserver.

Usage

Create a Git Bundle

On you local machine, create a Git bundle:

git bundle create path/to/file.bundle master

In order to make it easy to later update the other repository with an incremental bundle,
you can use a tag to remember up to what commit you last processed:

git tag -f lastbundle master

Upload the Bundle to the Shared Host

  1. On your shared host, open the php-git-bundle application.
  2. Click on Upload a Git bundle
  3. Select a Bundle File
  4. Click on [Run Command]

The bundle file will be uploaded and is now available to initialize a project or for a project to pull from.

Initialize the Shared Host Wep Application

  1. On your shared host, open the php-git-bundle application.
  2. Click on Clone Git repository from bundle
  3. Select a Project directory
  4. Select a Bundle File
  5. Click on [Run Command]

Apply a Bundle

  1. On your shared host, open the php-git-bundle application.
  2. Click on Apply a Git bundle
  3. Select a Project directory
  4. Select a Bundle File
  5. Click on [Run Command]

The selected bundle will be applied to the project.

Additional Commands

TO DO