Code

Sort references in the order: tags, heads, tracked remotes, remotes