Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

7 Tips You Should Know for Searching GitHub Repositories

DZone 's Guide to

7 Tips You Should Know for Searching GitHub Repositories

Searching GitHub using advanced search terms is more likely to bring you the results you need.

· Open Source Zone ·
Free Resource

You search on Google every day, and as a programmer, you would probably search on GitHub every day. Are you sure you know how to search GitHub repositories effectively? Let’s check out these 7 tips you probably didn’t know.

1. In Name, In Description, and In README

GitHub supports advanced search in a certain fields, like repository title, description, and README.

For example, you want to find some cool repository to learn Spring Cloud stuff, you can search like this:

in:name spring cloud

In the same way, you can also search in description or README only:

in:description spring cloud
in:readme spring cloud

2. More Stars, More Forks

Stars of a repository would provide information on how popular it is, which is an important metrics in consideration. As a result, you can search like this:

stars:>=3000 spring cloud

You can also define a range like this:

forks:10..20 spring cloud

3. Small Repositories, Please

Dinosaur repositories are not what you want; if you love those simple, small and smart repositories only, you can add this search term:

size:<=5000 spring cloud

Unit of size here is KB, so 5000 means 5MB.

4. Actively Maintained Repositories, Please

Most of the time you don’t want to rely on a project that didn’t update for 7 years. Actively maintained projects would give you more confidence, so you need to introduce the last push time in your search term. For example, you want to search those projects have updates in the last two weeks:

pushed:>2019-01-04 spring cloud

You may also search repositories created before or after a certain time using created rather than push.

5. Apache Licenses

The license of open source projects might bring you much trouble. You remember Facebook and React, right? If you want to search projects friendly licensed, like, for example, the well-known Apache License 2, you would search like this:

license:apache-2.0 spring cloud

Of course, you can hunt other licenses also; just search in the complete list provided by GitHub and choose the one you love.

6. Java Only

language:java will filter out repositories not written in Java! If you hate Java then replace it with the one you love, for example, the best programming language, PHP.

7. Rock Star Only

You may just want to search repositories by a development rockstar or a well-known organization because they are more likely awesome, so just include user in your search term like this:

user:joshlong spring cloud
org:spring-cloud spring cloud

Obviously, you can combine the 7 tips together for more complex search, for example:

user:joshlong language:java pushed:>2018-03-04 stars:>200 in:description spring boot

More Options to Explore

Want to explore all possible search terms? Just play around with “Advanced Search” or read the “search help” by GitHub. The time you spent there will be definitely worth it.

Happy Hunting!

Topics:
github ,search ,advanced search ,repositories ,open source ,license

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}