Lines Matching full:branch
482 * Runs a `git branch` call
484 * Accepts a name for the branch
487 * @param string branch name
490 public function createBranch($branch) argument
492 return $this->run("branch $branch");
496 * Runs a `git branch -[d|D]` call
498 * Accepts a name for the branch
501 * @param string branch name
504 public function deleteBranch($branch, $force = false) argument
506 return $this->run("branch " . (($force) ? '-D' : '-d') . " $branch");
510 * Runs a `git branch` call
513 * @param bool keep asterisk mark on active branch
518 $branchArray = explode("\n", $this->run("branch"));
519 foreach ($branchArray as $i => &$branch) {
520 $branch = trim($branch);
522 $branch = str_replace("* ", "", $branch);
524 if ($branch == "") {
532 * Lists remote branches (using `git branch -r`).
541 $branchArray = explode("\n", $this->run("branch -r"));
542 foreach ($branchArray as $i => &$branch) {
543 $branch = trim($branch);
544 if ($branch == "" || strpos($branch, 'HEAD -> ') !== false) {
552 * Returns name of active branch
555 * @param bool keep asterisk mark on branch name
573 * Accepts a name for the branch
576 * @param string branch name
579 public function checkout($branch) argument
581 return $this->run("checkout $branch");
588 * Accepts a name for the branch to be merged
591 * @param string $branch
594 public function merge($branch) argument
596 return $this->run("merge $branch --no-ff");
601 * Runs a git fetch on the current branch
656 * Push specific branch to a remote
658 * Accepts the name of the remote and local branch
661 * @param string $branch
664 public function push($remote, $branch) argument
666 return $this->run("push --tags $remote $branch");
670 * Pull specific branch from remote
672 * Accepts the name of the remote and local branch
675 * @param string $branch
678 public function pull($remote, $branch) argument
680 return $this->run("pull $remote $branch");