Making common words
I believe that you started to learn GitHub from Git, at least I did. At the beginning, I really didn’t know anything, because it was an English website and I was not familiar with it, so my use of GitHub was very limited.
First, let’s introduce common words on GitHub. What are common words? Take a look at the graph below:
I believe that the part marked by the red box is familiar to all of you. Does it feel familiar, but not very familiar? Let me introduce it to you:
- Used by: Indicates the number of people who use the project
- Watch: You can set the notification level here
- You can choose to accept the project feed only when you are concerned, accept all feed for the project, or accept no feed at all
- Star: This is a “like” function, nothing to say
- Fork: This is where projects can be pulled. If you want to contribute code, you can use Fork to pull projects into your remote library
GitHub precise search
Before working on a project, you should first consider if you can find a basic architecture on GitHub and then modify it. Or when you encounter a requirement while writing a project, you can check GitHub to see if there is one you can reference.
Search by keyword
For example, you are writing a shopping mall project, which involves the payment function. Although you are familiar with the payment function, it seems difficult to write it by yourself. Don’t worry, you can search it on GitHub, so you go to GitHub to search:
Enter pay in the search box, at this time the search results are more than 60,000, you are very happy, originally there are so many projects can give yourself, but, to find a use in these more than 60,000 projects, it is a little difficult, some projects with their own needs are not at all.
Therefore, it is obviously not good enough to search directly with Pay. Then, we can use some keywords for accurate search, such as:
With these keywords, we can perform a precise search for the items we need to find. For example, if I want to find a project whose name contains the pay string, you just need to search for pay in:name:
This allows us to ignore projects that don’t have a pay string in their name, which we don’t think is right for us.
We can continue to limit, such as project name, I want to search in the readme file and project description contain pay the project of the string, we can search payin: name, readme, the description:
Through such a limitation, can make the query out of the project more in line with our needs.
Of course, you can also limit the characters of each keyword, such as searching for pay in:name, alipay in:description:
This means looking for items that contain “pay” in their name and “Alipay” in their description.
Search by likes and forks
We can search for the desired item more accurately by defining the item by keyword. Of course, we can also search accurately by the number of likes and forks. In general, projects with high likes and forks are good projects.
For example, I use the keyword search: Pay in:name, Alipay in: Description, and find that there are still nearly 800 search results. Then how can I quickly find a good project from these 800 items? Let’s search for the most liked items. There are two ways to search:
Greater than or equal to symbols: stars:>1000, stars:<=5000
Range range Number: number 1… The number 2
Pay in:name In :description stars:>500: Pay in:name
Now that the search results are down to eight, we can go through the eight items and see which ones are right for us, and the workload drops significantly.
For example, if you want to search for items with 400 to 500 likes, you can type pay in:name, Alipay in: Description stars:400.. 500:
Forks = forks forks = forks forks = forks Forks = forks Forks = forks Forks = forks forks = forks forks = forks forks = forks forks
GitHub has only four search results, and these four projects Fork so high that they must be some good projects that you can use to learn and constantly improve yourself. So don’t always say that you don’t have learning materials. GitHub has everything.
Of course, they can also be used in combination, but I won’t show you.
Awesome search
What is awesome search? Let’s start by searching for awesome SpringMVC:
There are only four results, and you’ll find that all four are learning tutorials. In fact, the Awesome series is a collection of learning, tools, and books that we can find in awesome search.
So, if you want to learn a framework, a knowledge point, you can use awesome to search for learning resources.
Implementation code highlighting
This is a file code in a project on GitHub. If I want to send the file code to someone else, I can just send the address on the web page to someone else, but if the file is really heavy and I want to remind people where to start, you can use code highlighting.
So the question is how?
Let’s copy the current url:
https://github.com/BlackmodeN/AwesomeBlog/blob/master/src/blog/dao/ArticleDao.javaCopy the code
For example, if you want line 14 to be highlighted, simply concatenate a #L keyword after the address and add the line number:
https://github.com/BlackmodeN/AwesomeBlog/blob/master/src/blog/dao/ArticleDao.java#L14Copy the code
The effect is shown below:
If you want to highlight a piece of code, such as lines 1 through 14, it’s easy to change the url:
https://github.com/BlackmodeN/AwesomeBlog/blob/master/src/blog/dao/ArticleDao.java#L1-L14Copy the code
See the effect:
File finder
What is a file finder? Let’s start with a project:
If I want to see the contents of the project file, you don’t have to go into each folder, and then there are subfolders in the file, and GitHub is slow to access, so you will spend a lot of time browsing the whole project.
In fact, you don’t have to do this at all. You can use the file finder to browse the project. To do this, press the letter T on the current project page to activate the file finder.
All documents are at a glance.
We randomly enter a file:
If we want to jump to a line of code, we can do that. If we press the letter L on the page, the browser will pop up a window:
Type 60 and click Go to jump to line 60, which looks like this:
You can also switch project branches by pressing the letter W:
There are many other shortcuts on GitHub, but here are a few that are commonly used.
Search for active users
What do you do if you want to search GitHub for some of the most active users and the biggest names in your industry?
Is very simple, I studied the Java, for example, I want to search more active Java technology in hangzhou, you can enter the location: hangzhoulanguage: Java:
So you can search for it.