Tsugi

Git
in package

Git Interface Class

This class enables the creating, reading, and manipulation of git repositories.

Tags
class

Git

Table of Contents

Properties

$bin  : string
Git executable location

Methods

clone_remote()  : GitRepo
Clones a remote repo into a directory and then returns a GitRepo object for the newly created local repo
create()  : GitRepo
Create a new git repository
get_bin()  : mixed
Gets git executable path
is_repo()  : bool
Checks if a variable is an instance of GitRepo
open()  : GitRepo
Open an existing git repository
set_bin()  : mixed
Sets git executable path
windows_mode()  : mixed
Sets up library for use in a default Windows environment

Properties

$bin

Git executable location

protected static string $bin = '/usr/bin/git'

Methods

clone_remote()

Clones a remote repo into a directory and then returns a GitRepo object for the newly created local repo

public static & clone_remote(mixed $repo_path, mixed $remote[, mixed $reference = null ]) : GitRepo

Accepts a creation path and a remote to clone from

Parameters
$repo_path : mixed
$remote : mixed
$reference : mixed = null
Tags
access

public

Return values
GitRepo

create()

Create a new git repository

public static & create(mixed $repo_path[, mixed $source = null ]) : GitRepo

Accepts a creation path, and, optionally, a source path

Parameters
$repo_path : mixed
$source : mixed = null
Tags
access

public

Return values
GitRepo

get_bin()

Gets git executable path

public static get_bin() : mixed

is_repo()

Checks if a variable is an instance of GitRepo

public static is_repo(mixed $var) : bool

Accepts a variable

Parameters
$var : mixed
Tags
access

public

Return values
bool

open()

Open an existing git repository

public static open(mixed $repo_path) : GitRepo

Accepts a repository path

Parameters
$repo_path : mixed
Tags
access

public

Return values
GitRepo

set_bin()

Sets git executable path

public static set_bin(string $path) : mixed
Parameters
$path : string

executable location

windows_mode()

Sets up library for use in a default Windows environment

public static windows_mode() : mixed

        
On this page

Search results