tikiwiki/packages/tiki-pkg-tikimanager/gitonomy/gitlib/doc/branch.md

17 lines
319 B
Markdown
Raw Permalink Normal View History

2023-11-20 21:52:04 +01:00
Branch
======
To access a *Branch*, starting from a repository object:
```php
$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:
```php
$branch->isLocal();
$branch->isRemote();
```