src/Console/InitCommand.php
protected function getPushUrl($dir, $throws = false)
    {
        try {
            $remotes = $this->git->workingCopy($dir)->remote('show', 'origin',  '-n')->getOutput();

            if (preg_match('!Push\s*URL:\s*([^\s#]+)!', $remotes, $matches)) {
                return $matches[1];
            }
        } catch (GitException $exception) {
            if ($throws) {
                throw $exception;
            }
        }

        return null;
    }
protected function getPushUrl($dir, $throws = false)
    {
        try {
            $remotes = $this->git->workingCopy($dir)->remote('show', 'origin',  '-n')->getOutput();

            if (preg_match('!Push\s*URL:\s*([^\s#]+)!', $remotes, $matches)) {
                return $matches[1];
            }
        } catch (GitException $exception) {
            if ($throws) {
                throw $exception;
            }
        }

        return null;
    }
protected function getPushUrl ( $ dir , $ throws = false ) { try { $ remotes = $ this -> git -> workingCopy ( $ dir ) -> remote ( 'show' , 'origin' , '-n' ) -> getOutput ( ) ; if ( preg_match ( '!Push\s*URL:\s*([^\s#]+)!' , $ remotes , $ matches ) ) { return $ matches [ 1 ] ; } } catch ( GitException $ exception ) { if ( $ throws ) { throw $ exception ; } } return null ; }
Get the origin's push URL.

@param string $dir
@param bool $throws
@return null|string
Get the origin s push URL .