Files
faveo/vendor/gitonomy/gitlib/doc/api/branch.rst
2019-04-19 14:37:37 +05:30

17 lines
355 B
ReStructuredText

Branch
======
To access a *Branch*, starting from a repository object:
.. code-block:: 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:
.. code-block:: php
$branch->isLocal();
$branch->isRemote();