Skip to content

Instantly share code, notes, and snippets.

@santisbon
Last active April 22, 2024 14:15
Show Gist options
  • Save santisbon/2e1e9c69b58bdf4c9624219a44d40d83 to your computer and use it in GitHub Desktop.
Save santisbon/2e1e9c69b58bdf4c9624219a44d40d83 to your computer and use it in GitHub Desktop.
How to #search gists

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html

Find all gists with a ".bash_profile" file.
filename:.bash_profile

Excludes all results containing your search term.
NOT

Find gists with greater than 100 stars.
stars:>100

Include anonymous gists in your search.
anon:true

Search all forked gists for results.
fork:only

Find gists containing a file larger than 1000kbs.
size:>1000

Find all workshops by aws-samples updated recently.
workshop user:aws-samples pushed:>2019-12-01

Full code search:
https://help.github.com/articles/searching-code/

Searching:
https://help.github.com/en/github/searching-for-information-on-github/searching-for-repositories#search-by-when-a-repository-was-created-or-last-updated

@JMichaelTX
Copy link

@santisbon, thanks. This is very helpful.

@RickJP
Copy link

RickJP commented Nov 4, 2018

Great guide. Just what I was looking for.

@gnzgo
Copy link

gnzgo commented Mar 6, 2019

Thank you, exactly what I was looking for.

@jinahya
Copy link

jinahya commented Apr 28, 2019

Thank you for sharing this information!

@john-lorrenz
Copy link

thank you

@muthu32
Copy link

muthu32 commented Mar 3, 2020

Very Helpful. Thank you

@bard86
Copy link

bard86 commented May 23, 2020

Thnx!

@mals14
Copy link

mals14 commented Jun 2, 2020

thanks for pulling this together! do you know if it is possible to search the gists that you have starred? just like one can search forked gists.

@Svastikkka
Copy link

@santisbon, thanks

@johnquintero
Copy link

Thanks!

@coolaj86
Copy link

coolaj86 commented Jan 10, 2022

Do you know if it is possible to search the gists that you have starred?

Searching for this myself. I don't know what use it is to "Star" something if we can't go back and find the thing we starred. I thought that was the whole point...

Update: Found it:

https://gist.github.com/YOUR_USER_NAME/starred

Ex: https://gist.github.com/coolaj86/starred

@unlocomqx
Copy link

Why don't they make it easier to search your own gists?

@daanta-real
Copy link

Thank you!

@hochun836
Copy link

Thank you.

@jordanmsmith
Copy link

Great summary. However, since this seems to be the top search result for "github gist search syntax", here is a correction/update.

As far as I can tell, pushed:>YYYY-MM-DD is not a valid search parameter. Perhaps it was at one point in time.

BROKEN:

pushed:>YYYY-MM-DD

WORKING:

updated:>YYYY-MM-DD
created:>YYYY-MM-DD

Examples searches

workshop pushed:>2019-12-01
workshop updated:>2019-12-01
workshop created:>2019-12-01

Screenshot evidence

(the 3 results using updated are for this gist and 2 similar)
pushed:>YYYY-MM-DD


updated:>YYYY-MM-DD


created:>YYYY-MM-DD

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