Next: Most of the time we also need to integrate and modify other people's code, rather than simply modify it, then we need to modify a project.
Note that this series of articles focuses on the operations on the GitHub website, and more advanced operations using the GIT console
first, fork a project
Open a project and click "Fork" in the top right corner of the interface to create a copy of the code in your own project library.
The owner of this code is you, you can make any changes to the code. I fork a bitcoin project here, for example Https://github.com/bitcoin/bitcoin
When you get to your homepage, you see a copy of the project, which is exactly the same as the original project.
The line part reflects the source of the project, and the bottom is the project file. Next, you can perform a series of operations on the project.
Ii. Modification of the project
The key features of Git are collaborative development. When we feel that the code needs to be modified, we can modify and submit the changes to the original owner of the code, thus completing the collaboration of the Code once.
Click on one of the files in our project. You can see the contents of this file
The above contributor are contributors to this document, and they contribute to the preparation of the document.
If you also want to contribute, click Edit to enter the editing state
Add some text
Then we submit our changes (commit), the submission of the changes to fill in the content, so that others clearly modified what content. After the completion of the click Commit Changes, then the code was updated, contributor also saw my id~.
iii. Submission of amendment application
Note: What we have just done is under our own project, for example, under the Icyfox-bupt/bitcoin, the original project Bitcoin/bitcoin has not changed. After all, it's not safe to change the code if that's the case.
If you want to synchronize our code to the original project, you need to submit a request to the original project owner:
Go back to the project homepage, click Pull request, create a new PR (pull request), and on the next page you will see the changes made to the code by this commit.
Click on the Create pull requestabove to confirm the error, then make a code description, then click on Send Pull requestto complete the PR application.
This will appear in the Pull request list of the original project.
The author of the original project can determine whether our code is useful to decide whether or not to merge. Of course, because our code is completely invalid, it's bound to go into close.
These are some of the steps to git the project on the GitHub site, and note that these actions are Web pages, and if you want to use them seriously, use a console like Git bash.
Reprint please specify from: http://blog.csdn.net/icyfox_bupt/article/details/23305039