Github, the world’s largest open-source software hosting platform, has attracted countless developers to share their project code on github since its launch in 2008. Especially after Microsoft acquired Github, it attracted many non-program developers to share their knowledge and experience through the platform. It can be said that Github is a great treasure house containing countless values and treasures. However, with such a valuable platform, will you really use it?

The value of the lot

Github is extremely valuable. Here are just a few:

  • Host your own project code and files

  • Solve problems encountered in practical work

  • Learn from the knowledge and experience of others to improve their own ability

  • Provide a place for learning and communication

  • Set up your own blog

  • Enhance the influence and status of their own industry


How do I use Github

Before you read any further, make sure you’re not a “hand grabber”, because what follows is probably worthless to this section of the population and a waste of time.

How to use Github for project management

1. First, you need to specify that you want to upload github project content. Here I would like to remind you, you can not mention the content related to the company, but you have signed a confidentiality agreement, the content submitted to be careful, try to avoid the content related to the company. Even if you want to submit, you must rewrite one, of course, the company’s core content you do not submit, rewrite is not allowed, illegal things WE can not do.

Before submitting your project, you should first understand the Git command, because everything on Github is done through the Git command. Here are some common git commands for your reference.

3. After knowing the git command, the following is the start of uploading project code. Here I have an article how to use git command to submit project code for reference.

4. For project management operations, you can refer to GitHub project management basic operations on the Internet. Here’s what you need to know:

  • Master and branch
  • Merge requests (Pull Request and Merge)
  • Tag and release
  • Project Introduction (readme.md)
  • Knowledge base (wiki)
  • Suggestions (Issues)
  • Projects.

Ii. How to solve problems in practical work through Github

1. Determine the key words related to the technology.

2. Use GithubThe search functionDo a search. We can sort and filter the results by Languages and Most stars, as shown in the figure below:

3. Choose the project to reference. There are several factors to consider when choosing an open source project:

  • Project star quantity: the more the better.
  • Project activity: Factors considered here include the total number of issues, the number of open and closed issues, the speed of issue responses and resolution, and when the project was last submitted.
  • Documentation is complete: is there a wiki or readme.md
  • The quality of the project code: whether the design is reasonable, whether it conforms to the principles of design pattern, considering the scalability, convenience and stability of the project.
  • Level of open source author: star volume and industry influence of author’s other projects.
  • Pay attention to open source agreements to avoid unnecessary trouble.

As shown in the figure below, we need to pay attention to those marked red:

4. With reference projects identified, here’s how to use someone else’s open source projects.

(1) First read the project introduction (readme.MD) carefully, and generally understand the content of the project.

(2) Understand how to reference and use. You can read the project description (readme.md) or the wiki.

(3) If the project is relatively large, it is recommended to refer to the project demo source.

5. How to solve the problem. [This step is crucial]

When working with someone else’s open source project, it’s natural that there will be some discrepancies in requirements and, of course, some unknown bugs. Here’s an optimal solution.

(1) Go back and peruse readme. md and wikis to make sure you’re not misusing them.

(2) If the project has [Common problems], first see if you can solve your own problems.

(3) It is important to extract the keywords of the problem and search the issue of the project to see if there is a solution that cannot be solved. Open source developers generally hate repetitive issues.

(4) Make sure you make an issue when no one else has. Pay attention to clearly describe the contents of the issue here. If the project provides the issue template, please fill it in carefully as required. The open source has no time to speculate on your ideas there, which can solve everyone’s time.

(5) If the author of the issue you mentioned does not reply, there are three options for you:

  • See if the project readme. md has a communication group or author’s contact information at the end.

  • Fork project, directly modify the source code, solve the problem yourself. If you want to upload your modified code to the repository, here is a step-by-step guide to uploading the repository using Gradle scripts

  • Drop the project and find one that fits you better.

3. How can GIthub learn from others’ knowledge and experience to improve my ability

As the father of Linux that sentence “Talk is cheap. Show me the code.”, I have been pursuing the source code is the best teacher, look at the technical articles blown by others thousands of times, also not as good as their own real knife to masturbate a source code to have the effect. In fact, I’ve grown by constantly reading the source code of good open source projects that are hosted on Github for you to discover, absorbing their good design and essence.

1. Find good open source projects. There are two ways to find good Github open source projects:

  • Github’s search feature: If you have a specific approach to what you’re learning, use this.

  • Github’s Daily Trends: Use this if you’re interested in the latest tech buzz.

2. After finding the open source project you want to learn, here are my learning ideas for your reference:

(1) First, clone the source code of the project to the local, try to run the source code by yourself, and experience the effect of the project operation.

(2) Then, I will have a general understanding of the composition structure of the project, read the source code of the project roughly, and understand the general design ideas and main structure of the project. This step requires our ability to read the source code.

(3) Then, create a new project of your own, starting from 0, step by step to try to imitate the implementation ideas of the project, and write a set of your own. This step has a great requirement for our self-learning ability, because you will encounter a variety of problems in this process, and all of them are very difficult, which requires us to collect a lot of information to understand and learn all kinds of new knowledge. This is how you will continue to improve your skills and problem-solving skills. By the time your own project can perform as well as an open source project, you’re basically getting 80% of the value of that open source project.

(4) Finally, it is far from enough to simply imitate others’ open source projects, because others’ projects are always others’, not yours to imitate. Here we also need the ability to take the best from other people’s open source projects and apply them to our own projects. So what do we do? Here are two ways:

  • Project improvement. In the process of your imitation, you will certainly find some unreasonable design or congenital design defects in the project, improve them, expand and enrich the function of the project, and introduce it into the actual development work to constantly test their own improvement, continuous optimization and improvement.

  • Redesign and implement your own open source projects. This has high requirements for your own hands-on learning ability and design ability. Above all you should have a clear project goals and the design mentality, the second before you need to be learned in the process of imitating essence combined with its own project experience and design ideas, finally design and implement a valuable open source projects, and applied to the actual development work to keep the value of the inspection items, continuous optimization and improvement.

How to build your own blog on Github

I won’t go into the details here, there are many tutorials on the Internet, baidu search “use Github to build a blog”, you can find a lot of results. Here I recommend a more reliable article Github build personal blog for reference.

5. How to enhance the influence and status of the industry through Github

To improve the influence and status of the industry is not to blindly add various groups to promote their own open source projects or mutual star, so as to cheat a higher number of stars. What we really need to do is continue to write open source projects, continue to improve the quality of open source projects, and star volume and impact will naturally follow. So how can you improve the quality of open source projects? I will explain them one by one.

1. Excellent design ideas. A good open source project must have a good design idea. Here we need to have a deep understanding of the seven principles of design patterns. Here I recommend my blog on Java design patterns in practice on Android.

2. Complete documentation. Documentation is the first thing people know about your project. This includes the project’s home page, readme.md, wiki, and issue templates. In addition to the content of the project documents to be rich, but also need to constantly update the document with the project iteration.

3. Good code specification. In open source projects, good code specification is a must, otherwise people will feel uncomfortable reading your code and give up halfway through the project. The code that recommends Alibaba here is normative sharp tool

4. Effective communication channels. QQ groups are recommended here. Of course, if you are not afraid of harassment, you can also put your QQ number and email.

5. Rich use cases. This may be a tall order, as the average individual open source rarely collects use cases for projects. Even so, I encourage you to collect use cases for your own projects, as this will ease the fear of many conservative developers adopting this open source project.

Wechat official account

More information, welcome to wechat search public number: [My Android open source journey]