dev/src/Split/GitHub.php
public function push($target, $ref, $targetBranch = 'master', $force = true)
    {
        $cmd = [
            'git push -q',
            sprintf('https://%s@github.com/%s', $this->token, $target),
            sprintf('%s:%s', $ref, $targetBranch)
        ];

        if ($force) {
            $cmd[] = '--force';
        }

        return $this->shell->execute(implode(' ' , $cmd));
    }
public function push($target, $ref, $targetBranch = 'master', $force = true)
    {
        $cmd = [
            'git push -q',
            sprintf('https://%s@github.com/%s', $this->token, $target),
            sprintf('%s:%s', $ref, $targetBranch)
        ];

        if ($force) {
            $cmd[] = '--force';
        }

        return $this->shell->execute(implode(' ' , $cmd));
    }
public function push ( $ target , $ ref , $ targetBranch = 'master' , $ force = true ) { $ cmd = [ 'git push -q' , sprintf ( 'https://%s@github.com/%s' , $ this -> token , $ target ) , sprintf ( '%s:%s' , $ ref , $ targetBranch ) ] ; if ( $ force ) { $ cmd [ ] = '--force' ; } return $ this -> shell -> execute ( implode ( ' ' , $ cmd ) ) ; }
Push a given commit ref to GitHub.

@param string $target The GitHub organization and repository ID separated
by a forward slash, i.e. `organization/repository'.
@param string $ref The commit reference.
@param string $targetBranch The remote branch to push to. **Defaults to**
`master`.
@param bool $force If true, will use `--force` flag. **Defaults to**
`true`.
@return array A list containing [(bool) $success, (string) $output].
Push a given commit ref to GitHub .