Methods summary
public
|
|
public
string
|
|
public
Cz\Git\GitRepository
|
#
createTag( string $name )
Creates a tag.
git tag <name>
Creates a tag.
git tag <name>
Parameters
Returns
Throws
Implementation of
|
public
Cz\Git\GitRepository
|
#
removeTag( string $name )
Removes tag.
git tag -d <name>
Removes tag.
git tag -d <name>
Parameters
Returns
Throws
Implementation of
|
public
Cz\Git\GitRepository
|
#
renameTag( string $oldName, string $newName )
Renames tag.
git tag <new> <old>
git tag -d <old>
Renames tag.
git tag <new> <old>
git tag -d <old>
Parameters
Returns
Throws
Implementation of
|
public
string[]|null
|
#
getTags( )
Returns list of tags in repo.
Returns list of tags in repo.
Returns
string[]|null NULL => no tags
Implementation of
|
public
Cz\Git\GitRepository
|
#
merge( string $branch, array|null $options = NULL )
Merges branches.
git merge <options> <name>
Merges branches.
git merge <options> <name>
Parameters
Returns
Throws
Implementation of
|
public
Cz\Git\GitRepository
|
#
createBranch( string $name, boolean $checkout = FALSE )
Creates new branch.
git branch <name>
(optionaly) git checkout <name>
Creates new branch.
git branch <name>
(optionaly) git checkout <name>
Parameters
Returns
Throws
Implementation of
|
public
Cz\Git\GitRepository
|
#
removeBranch( string $name )
Removes branch.
git branch -d <name>
Removes branch.
git branch -d <name>
Parameters
Returns
Throws
Implementation of
|
public
string
|
#
getCurrentBranchName( )
Gets name of current branch
git branch + magic
Gets name of current branch
git branch + magic
Returns
string
Throws
Implementation of
|
public
string[]|null
|
#
getBranches( )
Returns list of branches in repo.
Returns list of branches in repo.
Returns
string[]|null NULL => no branches
Implementation of
|
public
Cz\Git\GitRepository
|
#
checkout( string $name )
Checkout branch.
git checkout <branch>
Checkout branch.
git checkout <branch>
Parameters
Returns
Throws
Implementation of
|
public
Cz\Git\GitRepository
|
#
removeFile( string|string[] $file )
Removes file(s).
git rm <file>
Removes file(s).
git rm <file>
Parameters
Returns
Throws
Implementation of
|
public
Cz\Git\GitRepository
|
#
addFile( string|string[] $file )
Adds file(s).
git add <file>
Adds file(s).
git add <file>
Parameters
Returns
Throws
Implementation of
|
public
Cz\Git\GitRepository
|
#
renameFile( string|string[] $file, string|null $to = NULL )
Renames file(s).
git mv <file>
Renames file(s).
git mv <file>
Parameters
- $file
- array('from' => 'to', ...) || (from, to)
- $to
Returns
Throws
Implementation of
|
public
Cz\Git\GitRepository
|
#
commit( string $message, string[] $params = NULL )
Commits changes
git commit <params> -m <message>
Commits changes
git commit <params> -m <message>
Parameters
- $message
- $params
- => value
Returns
Throws
Implementation of
|
public
boolean
|
#
isChanges( )
Exists changes?
git status + magic
Exists changes?
git status + magic
Returns
boolean
Implementation of
|
protected
Cz\Git\GitRepository
|
#
run( string|array $cmd )
Runs command.
Parameters
Returns
Throws
|
public static
Cz\Git\GitRepository
|
#
init( string $directory )
Init repo in directory
Parameters
Returns
Throws
|