public function getCurrentBranch()
    {
        /** @var $result CallResult */
        $result = $this->getGit()->{'rev-parse'}($this->getRepositoryPath(), array(
            '--symbolic-full-name',
            '--abbrev-ref',
            'HEAD'
        ));
        $result->assertSuccess(
            sprintf('Cannot retrieve current branch from "%s"', $this->getRepositoryPath())
        );

        return $result->getStdOut();
    }