Gush\Command\Branch\BranchSyncCommand::execute PHP Method

execute() protected method

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        /** @var GitHelper $gitHelper */
        $gitHelper = $this->getHelper('git');
        $remote = $input->getArgument('remote');
        $branchName = $input->getArgument('branch_name');
        if (null === $branchName) {
            $branchName = $gitHelper->getActiveBranchName();
        }
        $gitHelper->syncWithRemote($remote, $branchName);
        $this->getHelper('gush_style')->success(sprintf('Branch "%s" has been synced with remote "%s".', $branchName, $remote));
        return self::COMMAND_SUCCESS;
    }
BranchSyncCommand