Github Sao operation

GitHub actually has these Sao operations, it is really a gesture

GitHub, without too much introduction. A hosting platform for open source and private software projects, because it only supports git as the only repository format for hosting, it is named GitHub.

As the "world's largest programmer" friendship "community", can you really use it to the extreme?

The article is included in GitHub JavaKeeper , the N-line Internet development essential skills weapon spectrum

search for

Global search

Fool search

For example, if we want to learn the implementation of the seckill code, we can search for relevant content globally on the entire GitHub site

However, such a search range is too large, and the quality of the project is uneven, so in the search results page, you can also select the implementation language through Languages ​​and Sort select the sorting rules (by the number of stars, the number of forks, the latest update time, etc.).

Precise search (technical range)

1. in keyword restricts the search scope

official:搜索词 in:name(/description/readme)

Search the project name and readme file containing the seckill in: name, readme

Qualifier Examples
in:name jquery in:name Match the contents of the warehouse name containing "jquery"
in:description jquery in:name,description Match content that contains "jquery" in the warehouse name or description (combined use)
in:readme jquery in:readme readme file contains "jquery"
repo:owner/name repo:octocat/hello-world Query someone's project (check octocat's hello-world warehouse)
2. Keyword search

Search syntax :

  • >n, >=n, <n, <=n: Query number range, may be starts, forks, topics ......
  • n..*, *..n: Equivalent >=nand<=n
  • n..m: Value range n to m
Qualifier Examples
stars:n stars: 500 matches items with 500 stars
stars: 10..20 matches items with 10 to 20 starts
followers:n node followers:>=10000 Match the node warehouse with followers greater than or equal to 10000
forks:n seckill forks: 5 matches spikes with 5 forks
created:YYYY-MM-DD seckill created:> 2020-01-01 Create a spike project after 2020-01-01
language:LANGUAGE seckill language: java matches the spike project written in java language
user:name user: Jstarfish stars:> 50 matches Jstarfish users with more than 50 stars
location:LOCATION location: beijing matches friends in Beijing
Use in combination with each other seckill stars:> = 500 fork: true language: java match a large number of stars equal to 500 (containing the number of forks), and the language is java spike Project
location: beijing language: java Beijing doing Java development chiefs
3. Awesome strengthens search

awesome 关键字, Awesome series, is generally used to collect learning, tools, books related items. For example, we want to learn about redis related projects, including frameworks, tutorials, etc.,awesome redis

These are actually enough, the official also gives all the search methods you can think of:

https://help.github.com/en/github/searching-for-information-on-github/searching-on-github

Search within project

File search

Enter the main page of the warehouse, there is a Find file , you can search by file name

hot key

  • sOr /navigate to the search box

  • g + operation, indicating a jump

    • g d Go to my homepage
    • g n Go to the notification panel About notifications
    • g c Go to Code tab (the following are all on the warehouse page)
    • g i Go to the issue interface
    • g w Go to About Wike
  • t Activate file search, same as Find file

  • w Switch branch

  • l When browsing the code, quickly jump to the specified line

Officially provided: https://help.github.com/en/github/getting-started-with-github/keyboard-shortcuts

Highlight code

Sometimes we have to ask big brother, big brother to help look at the code so that you can use highlighting, find your code on GitHub or GitLab in the url address plus #L 数字representation highlight the first few lines, plus #L 数字 -L数字, highlight the code represents the interval (The second L is not needed on GitLab)

eg:

https://github.com/Jstarfish/starfish-learning/blob/master/starfish-learn-designpattern/src/decorator/Client.java#L16-L20

View popular trends on GitHub

https://github.com/trending can view the popularity by language, date range (this day, this week, this month), there are many popular items for learning.

Plugin

Finally, I recommend a browser plugin to view GitHub code.

octotree is used to display the Github project code in a tree format, you can look at the code like an IDE. And in the displayed list, we can download the specified file without downloading the entire project.

img

Guess you like

Origin www.cnblogs.com/lazyegg/p/12703275.html
Sao