def push_to_server(local_branch, remote_branch, opts = {})
      if opts[:local]
        logger.debug('Not pushing to the server because the user selected local-only.')
      elsif not has_a_remote?
        logger.debug('Not pushing to the server because there is no remote.')
      elsif local_branch == config.master_branch
        logger.warn('Not pushing to the server because the current branch is the mainline branch.')
      else
        opts[:prepush].call if opts[:prepush]

        push(remote.name, local_branch, remote_branch, :force => opts[:force])

        opts[:postpush].call if opts[:postpush]
      end
    end
def push_to_server(local_branch, remote_branch, opts = {})
      if opts[:local]
        logger.debug('Not pushing to the server because the user selected local-only.')
      elsif not has_a_remote?
        logger.debug('Not pushing to the server because there is no remote.')
      elsif local_branch == config.master_branch
        logger.warn('Not pushing to the server because the current branch is the mainline branch.')
      else
        opts[:prepush].call if opts[:prepush]

        push(remote.name, local_branch, remote_branch, :force => opts[:force])

        opts[:postpush].call if opts[:postpush]
      end
    end
Push the repository to the server.

 @param local_branch [String] the name of the local branch to push from
 @param remote_branch [String] the name of the remote branch to push to

 @option opts [Boolean] :local should this do nothing because it is in local-only mode?
 @option opts [Boolean] :force should it force the push even if it can not fast-forward?
 @option opts [Proc] :prepush a block to call before doing the push
 @option opts [Proc] :postpush a block to call after doing the push

 @return [void]