PHP Class yii2tech\selfupdate\Git

See also: https://git-scm.com/
Since: 1.0
Author: Paul Klimov ([email protected])
Inheritance: extends VersionControlSystem
Afficher le fichier Open project: yii2tech/selfupdate

Méthodes publiques

Свойство Type Description
$binPath path to the 'git' bin command. By default simple 'git' is used assuming it available as global shell command. It could be '/usr/bin/git' for example.
$remoteName name of the GIT remote, which should be used to get changes.

Méthodes publiques

Méthode Description
applyRemoteChanges ( string $projectRoot, string &$log = null ) : boolean Applies changes from remote repository.
getCurrentBranch ( string $projectRoot ) : string Returns currently active GIT branch name for the project.
hasRemoteChanges ( string $projectRoot, string &$log = null ) : boolean Checks, if there are some changes in remote repository.

Method Details

applyRemoteChanges() public méthode

Applies changes from remote repository.
public applyRemoteChanges ( string $projectRoot, string &$log = null ) : boolean
$projectRoot string VCS project root directory path.
$log string if parameter passed it will be filled with related log string.
Résultat boolean whether the changes have been applied successfully.

getCurrentBranch() public méthode

Returns currently active GIT branch name for the project.
public getCurrentBranch ( string $projectRoot ) : string
$projectRoot string VCS project root directory path.
Résultat string branch name.

hasRemoteChanges() public méthode

Checks, if there are some changes in remote repository.
public hasRemoteChanges ( string $projectRoot, string &$log = null ) : boolean
$projectRoot string VCS project root directory path.
$log string if parameter passed it will be filled with related log string.
Résultat boolean whether there are changes in remote repository.

Property Details

$binPath public_oe property

path to the 'git' bin command. By default simple 'git' is used assuming it available as global shell command. It could be '/usr/bin/git' for example.
public $binPath

$remoteName public_oe property

name of the GIT remote, which should be used to get changes.
public $remoteName