What You still don’t search for resources on GitHub Why don’t you come in and take a look

Hits: 0

[As the world’s largest”same-sex dating” website, GitHub] has many excellent open source projects and learning tutorials. So how can you efficiently search for the content you want on GitHub? Don’t worry, then read on.

search item

in keyword search

This keyword can be searched according to the resource name on GitHub, the description and the content of the readme file

# syntax 
[ keyword ] in :[name|description|readme]
​
# Example 
springcloud in :name,description,readme # Comma separation means or

▲ Search results

Search according to the number of stars and forks

Excellent projects can be accurately searched according to the number of stars and forks

# Syntax
 [keyword]  [stars|forks] :> [quantity] # Greater than or less than query
 [keyword]  [stars|forks] : [range 1] .. [range 2] # Range query
​
# Example 1
springcloud stars:>1000
​
# Example 2
springcloud stars:3000..5000

▲ Search result 1

▲ Search result 2

Search by creation and update time

Searching based on creation and update time can filter out relatively new projects, or projects that have been updated recently

# syntax 
[keyword]  created:>[year-month-day]  # creation time 
[keyword]  pushed:>[year-month-day]  # update time 
​#
 example 
springcloud  pushed:>2021-01-01

▲ Search results

Search by License

License that can explicitly search the warehouse

# Syntax 
[keyword]  license:[protocol] 
​#
 Example 
springcloud  license:apache-2.0

▲ Search results

Search by a person or organization

If you want to find out whether a great god has submitted a new function on GitHub, you can specify its name and search for it

# Syntax 
user: [name]  # Search by personal name 
user: [name]  language:[language]  # Search by personal name + language 
org: [name]  # Search by organization name 
​#
 Example 1 
user: joshlong  language:  
java 
# Example 2 
org: springcloud

▲ Search result 1

▲ Search result 2

search code

Searching for code in files on GitHub has some limitations

  1. When you need to search fork resources, you can only search fork resources with more stars than parent resources, and you need to add fork:true query

  2. Only files smaller than 384 KB are searchable

  3. Only repositories with less than 500,000 files are searchable

  4. Except for filename searches, at least one keyword must always be included when searching source code

  5. Search results can show up to two sections of the same file, but there may be more results within the file

  6. Wildcards cannot be used

Search by file content, path

# syntax 
[ keyword ] in :file # file content 
[ keyword ] in :path # file path
​
# Example 
Application in :file

▲ Search results

search under a resource

# Syntax 
[keyword]  repo:[resource] 
​#
 Example 
Application  repo:forezp/SpringCloudLearning

▲ Search results

Search by language

# Syntax 
[keyword]  language:[language] 
​#
 Example 
Application  language:java  # Search for Application in java

▲ Search results

Search by filename, size, extension

# syntax 
[keyword]  filename:[filename]  # filename 
[keyword]  size:>[size]  # file size 
[keyword]  extension:[extension]  # extension 
​#
 Example 
Application  filename:GatewayApplication  size: >10  extension:java  

▲ Search results

Summarize

How to efficiently search for resources on GitHub, have you learned anything?

For more articles, you can scan the code on WeChat and follow the public account

You may also like...

Leave a Reply

Your email address will not be published.