GitHub in PR (Pull request) operation

1. The contribution of code:

Contributing code, popular to say, is to make changes to the code, I hope merged into other people's Repository (warehouse) in. They will contribute their wisdom to the open source community. The following steps will be explained in detail

Step 1.1: fork

GitHub wandering in the community, seeing an item code, such as: spring-projects / spring-framework, click on the page Fork button, generates its own Repository (warehouse: thinkingfioa / spring-framework), as shown below:


1.2 Step two:

After successfully modified fork, after the adoption of git clone, modify, commit, push, etc, will modify the content, submit to your own warehouse (thinkingfioa / spring-framework) in. If git clone, commit and push do not know their own Baidu. As shown below:

 

Step 1.3: merge code request (Pull Request)

In step 1.2, we have modified their warehouse (thinkingfioa / spring-framework) code. We want to contribute to a force, the modified Commit also submit to someone else's warehouse (spring-projects / spring-framework) in. Will carry out Pull Request.

1.3.1 Creating PR

 

 

1.3.2 Create pull request

Please pay special attention to winning the red part of the figure below, can not engage in counter. Click: Create pull request green button to complete the submission of PR. 

 

 

1.3.3 wait

PR after the submission is complete, wait for the other warehouse (spring-projects / spring-framework) administrator audit, if he agrees, then the contribution of the code is complete.


2. PR synchronization latest code

In addition to contributing code, you can also sync other latest code. In layman's terms, fork a warehouse (eg: spring-projects / spring-framework) code after a period of time, in order to synchronize its own warehouse (thinkingfioa / spring-framework) and the other warehouses (spring-projects / spring-framework) Code, to ensure that own warehouse code is the latest version.

2.1 synchronization latest code

2.1.1 Create pull request

This step 1.3.2 above and the same, just pay attention to the arrow, which warehouses which warehouse consolidation. Please note the icon red part self-study 

2.1.2 Click the green button to complete the code synchronization

 

Guess you like

Origin www.cnblogs.com/momo798/p/11599679.html