tikiwiki/packages/tiki-pkg-tikimanager/gitonomy/gitlib/doc/branch.md
2023-11-20 20:52:04 +00:00

319 B
Executable File

Branch

To access a Branch, starting from a repository object:

$repository = new Gitonomy\Git\Repository('/path/to/repository');
$branch = $repository->getReferences()->getBranch('master');

You can check is the branch is a local or remote one:

$branch->isLocal();
$branch->isRemote();