Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you control the order in which files appear in a GitHub gist

Tags:

github

gist

Is there a way to control the order in which files appear in a gist? They don't seem to be alphabetical or chronological. I'd like to have a README.md appear as the first file in a multi-file gist, but no amount of "deleting" a file and re-adding it seems to change anything.

Is there an order to these files that I'm not seeing, or does GitHub maintain an internal filetype priority list?

like image 309
Sinetheta Avatar asked Jul 15 '13 22:07

Sinetheta


People also ask

How do I edit my gist on GitHub?

How Do I Edit or Delete a Gist? In the top right corner of your gist page, there will be a menu that allows for multiple functions to be performed on your gist. We can edit, delete, unsubscribe, star, embed, copy, share, and download a raw copy or zipped copy of a gist. We also can share a gist in multiple ways.

Can I arrange repositories into folders on GitHub?

On GitHub itself, you cannot group your repos by "folder", unless you create organizations. See SublimeText, for instance, as a group of all sublimeText packages repos. But that won't support a nested folder organization. For now (June 2017), that only supports a nested team organization structure.


1 Answers

Since at least 2018, the order is alphabetical, with periods and numbers coming before letters.

That is, as mentioned in Andrew D.Bond's answer:

  1. $
  2. . (dot)
  3. Numbers
  4. Leading space (although the space doesn't appear after saving, the sort order is still updated)
    (although bis, in Sept. 2020, IvanaGyro adds in the comments leading spaces will not affect the order any more)
  5. _ (underscore)
  6. Letters (case insensitive)

Around 2013-2014 a different order was used.

like image 106
VonC Avatar answered Sep 28 '22 00:09

VonC