[GitHub] Sixth: Open Source Project Contribution Process _ Open Source project

Source: Internet
Author: User

Github is currently the world's largest open source project hosting Exchange platform. The process of contributing open source projects is also Github full support, but also follow the Github flow, although there will be a little difference with the previous team cooperation process. Within the team, everyone has permission to write. But there are many participants in open source projects online. If you go up and say to the owner of the project, Hey, you give me a permission to write, do not tease, people do not know you, how can it be. Fork

So the first step is to Fork the project. The so-called I fork someone else's project, means to make a copy of this project, put it under my own account.

The whole process based on fork is the idea shown above. The first step, first fork, so I have HAPPYPETER/TLCL this project, since it is my own project, I can clone it to my local, make changes, and then pushed to GitHub on the fork of my own. In this way I compare my own fork with the upstream warehouse, which is the Billie66 warehouse, to send out Pull Request.

The following is the actual operation.

Come to TLCL's project homepage, which is Https://github.com/billie66/TLCL. The fork button in the upper-right corner of the point.

In this way, my own name on a TLCL project, this project is called the original project of a fork.

Here fork this step is over. That for HAPPYPETER/TLCL this warehouse, I certainly have the right to modify, you can modify the Web page directly issued PR. But generally I will clone to local client, modify locally, point to the lower right corner of the clone in Desktop button, to the project clone to Local.

Make version and Sync

The Github flow, which distinguishes it from teamwork, is largely without a new branch, but creates a new fork. The upstream warehouse BILLIE66/TLCL code is on the Gh-pages branch, so now I am in the local gh-pages modify, the new version of sync to the gh-pages on the HAPPYPETER/TLCL can be.

Local modifications, commit, and then sync to the remote HAPPYPETER/TLCL, these steps should now be familiar, a piece of cake. So to github.com, you can see the following figure

As shown above to HAPPYPETER/TLCL's Warehouse home page, you can see the latest version of my message, point open can see my revised content, now can be issued PR. Send PR and code audits

The process of issuing PR has no essential difference from the previous introduction.

As pictured above, click the Pull request link on the right side of the project page and the page that arrives will have a big green button New Pull request, click on the page below to see

Note above 1, to choose which two branches to compare, the left side is the upstream branch, that is, the "destination" branch, on the right is my own branch, there are modified content. Sometimes GitHub can guess which two branches to compare, sometimes you have to manually choose. If the branch is chosen incorrectly, then 2 of the contrast code will certainly have problems, so it is relatively easy to see. Below can point 3 big button to send PR. After that, under the BILLIE66/TLCL, attention is not HAPPYPETER/TLCL below, you will see this PR.

When the project owner Billie66, or the project's collaborator (collaborator) sees Pull Request, you can come and discuss it with me. If you decide to merge my code into your warehouse, click the merge Pull Request button.

In this way, my work on this contribution code is over. TLCL's version of history will always leave Happypeter's name. At the same time I sent this PR turned off, can also be in the BILLIE66/TLCL Pull Requests under a permanent preservation, so I can safely delete my own that fork. Follow-up work

Deleting a fork is the same as deleting a project warehouse of my own.

As shown above, click to open the settings and then enter the Danger Zone to find delete this Repository can be deleted HAPPYPETER/TLCL. Of course, if you will frequently contribute to the same project, their own name long-term retention of a fork is also possible, but this time to ensure that this fork and upstream warehouse synchronization, but also very troublesome. So for beginners, delete, some days if you want to contribute, and then fork again not late.

For Project maintainers, if you want to keep abreast of your own projects and who are changing their fork, you can look at the project's network, as shown below:

Fast PR based on fork

The previous introduction of the fast PR, but that process is based on my own write permissions of the project. That for other people's open source projects, I simply can not modify, can not be directly on the Web page to send a quick PR. Luckily, the answer is yes. And the process is super simple and intuitive.

The practice is, I came to BILLE66/TLCL this project, do not do fork, but directly open a file I want to edit, modify, and then make a commit when choosing the second item in the following figure.

In this way, GitHub will automatically help me fork a HAPPYPETER/TLCL out, the changes I made commit to my own this fork. After this, directly into the PR interface, the operation is the same as the previous process. Summarize

Contribute to open source projects, the process can be discussed with veteran, so it is a good way to learn programming.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.