PHP code example of oblik / kirby-git

1. Go to this page and download the library: Download oblik/kirby-git library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

oblik / kirby-git example snippets


return [
    'oblik.git.repo' => '/path/to/repo',
    'oblik.git.merge' => 'master',
    ...
];

return [
    'oblik.git.hooks' => [
        'site.update:after',
        'page.update:after'
    ]
];

return [
    'oblik.git.log' => '/path/to/kirby-git.log'
];

use Oblik\KirbyGit\Git;

$git = new Git();
$git->add();
$git->commit('my message');
$git->push();