Methods |
public
|
clone(string $repo, string $target, array $opts): bool
Clone a repositroy
|
#
|
public
|
clean(string $path, bool $dir = true, bool $dry = false): bool|array
Clean repository of stray files
Clean repository of stray files
Parameters
$dir |
remove directory as well
|
|
#
|
public
|
valid(string $path): bool
Path is valid git repository
Path is valid git repository
|
#
|
public
|
stash(string $path, string|null $message = null): string|null
Stash pending changes into new commit
Stash pending changes into new commit
|
#
|
public
|
reset(string $path, string|null $commit = null, bool $hard = true): bool
Reset repository to commit
Reset repository to commit
|
#
|
public
|
tag(string $path): array|null
List tags for repository
|
#
|
public
|
init(string $path, bool $bare = true): bool
Initialize a git repository
Initialize a git repository
|
#
|
public
|
fetch(string $path, array $opts = []): bool
Download objects and refs from another repository
Download objects and refs from another repository
|
#
|
public
|
add(string $path, array|null $files = []): bool
Add files to an existing repo
Add files to an existing repo
Parameters
$path |
repo path
|
$files |
files relative to repo; files are not escaped
|
|
#
|
public
|
head(string $path): string|null|bool
Get head commit
|
#
|
public
|
add_ignore(string $path, $files): bool
Add files to ignore
|
#
|
public
|
list_ignored_files(string $path): array
List ignored files
|
#
|
public
|
list_commits(string $path, int|null $max = 5): array
Get last n commits
|
#
|
public
|
commit(string $path, string $msg): string|null
Commit staged transaction
Commit staged transaction
Returns
|
#
|
public
|
checkout(string $path, string|null $ref, array|null $files = null): bool
Checkout ref/tag
|
#
|
public
|
version(): string
git version
|
#
|