How can you choose which group to output first when using the group filter?
Rather than changing the order of the actual array returned by the group filter, you can just assemble a new array that has the keys in the order you want:

{# Get the grouped entries #}
{% groups = entries|group('foo') %}

{# Create an array of the group keys in the desired order #}
{% set keys = ['foo']|merge(groups|keys|without('foo')) %}

{# Now loop through the keys, rather than the groups directly #}
{% for key in keys %}

    {# Get the group with this key #}
    {% set group = groups[key] ?? [] %}

    {# Loop through the entries #}
    {% for entry in group %}
        ...
    {% endfor %}

{% endfor %}


(Note that the ?? operator requires Craft 2.6.)