def push_delete(branch_name, remote_name, opts)
      remote_name ||= 'origin'

      args = [remote_name]

      if branch_name
        rb = branch_name
      elsif !(opts[:delete].is_a? TrueClass)
        rb = opts[:delete]
      else
        raise ArgumentError.new('Need a branch name to delete.')
      end

      int_branch = config.master_branch
      if rb == int_branch
        raise GitProc::GitProcessError.new("Can not delete the integration branch '#{int_branch}'")
      end

      logger.info { "Deleting remote branch '#{rb}' on '#{remote_name}'." }
      args << '--delete' << rb
      return command(:push, args)
    end
def push_delete(branch_name, remote_name, opts)
      remote_name ||= 'origin'

      args = [remote_name]

      if branch_name
        rb = branch_name
      elsif !(opts[:delete].is_a? TrueClass)
        rb = opts[:delete]
      else
        raise ArgumentError.new('Need a branch name to delete.')
      end

      int_branch = config.master_branch
      if rb == int_branch
        raise GitProc::GitProcessError.new("Can not delete the integration branch '#{int_branch}'")
      end

      logger.info { "Deleting remote branch '#{rb}' on '#{remote_name}'." }
      args << '--delete' << rb
      return command(:push, args)
    end
Pushes the given branch to the server.

 @param [String] remote_name the repository name; nil -> 'origin'
 @param [String] branch_name the name of the branch to push to

 @option opts [Boolean, String] :delete if a String it is the branch name

 @return [String] the output of the push command

 @raise [ArgumentError] no branch name is given
 @raise [raise GitProc::GitProcessError] trying to delete the integration branch

 @todo remove the opts param