Skip to content

Instantly share code, notes, and snippets.

@rwcitek
Created October 25, 2024 19:08
Show Gist options
  • Save rwcitek/490fd280f314a971aaae0e930f227433 to your computer and use it in GitHub Desktop.
Save rwcitek/490fd280f314a971aaae0e930f227433 to your computer and use it in GitHub Desktop.
Searching Gists

Searching gists with qualifiers

When searching for gists on GitHub, you can use various qualifiers to refine your search. Here are some useful keys you can utilize:

  • user: - Search gists created by a specific user (e.g., user:foobar).

  • public: - Find public gists (e.g., public:true).

  • private: - Find private gists (e.g., private:true).

  • created: - Filter gists by the date they were created (e.g., created:>2023-01-01).

  • updated: - Filter gists by the date they were last updated (e.g., updated:<2023-10-01).

  • language: - Search gists by programming language (e.g., language:python).

  • description: - Search for specific terms in the gist description (e.g., description:"my project").

  • filename: - Search for gists containing a specific filename (e.g., filename:script.js).

  • stars: - Filter gists based on the number of stars (e.g., stars:>10).

  • forks: - Filter gists based on the number of forks (e.g., forks:>5).

You can combine these qualifiers to narrow down your search even further! For example, you could search for public gists by a specific user in Python created after a certain date.

When you use multiple qualifiers in your GitHub search, they are logically ANDed together. This means that the results will only include gists that match all the specified qualifiers. For example, if you search for user:foobar language:python, you’ll only get gists that are both created by the user "foobar" and are in Python.

If you want to include results that match any of several conditions, you'll need to use separate searches or adjust your search terms accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment