code: public function getBranches()
      {
          if ($this->gitDriver) {
              return $this->gitDriver->getBranches();
          }
          if (null === $this->branches) {
              $this->branches = array();
              $resource = $this->getApiUrl() . '/repos/'.$this->owner.'/'.$this->repository.'/git/refs/heads?per_page=100';
  
              $branchBlacklist = array('gh-pages');
  
              do {
                  $branchData = JsonFile::parseJson($this->getContents($resource), $resource);
                  foreach ($branchData as $branch) {
                      $name = substr($branch['ref'], 11);
                      if (!in_array($name, $branchBlacklist)) {
                          $this->branches[$name] = $branch['object']['sha'];
                      }
                  }
  
                  $resource = $this->getNextPage();
              } while ($resource);
          }
  
          return $this->branches;
      }
docs: {@inheritDoc}