Modify someone else's code
The last knowledge point explains how to modify your own code, then how to modify other people's code. Strictly speaking, is not able to directly modify other people's code, can only be based on other people's projects, cloning a project out to their own account, to their account, you can modify.
Once you have modified it, initiate a merge request, and if the original project author accepts your request for a merger, then you have contributed to the original project and modified the original project. Fork
Based on someone else's project, do a clone, clone a similar project to your account, this behavior is called fork.
Fork English is the meaning of a fork, said in the original project based on the emergence of branches.
Perform fork operations on GitHub
1. First login with your own account password
2. Visit the Hellogit project:
Https://github.com/how2j/hellogit
3. Click on the Fork button in the upper right corner
Make some changes.
After the fork, Hellogit will be cloned into your account, and then hellogit to do some changes
Package hellogit;
public class Hellogit {public
static void Main (string[] args) {
System.out.println ("Hello Git yyy");
}
Launch new Pull Request
Go back to GitHub's Hellogit project, and then click New Pull request, which initiates a merge call.
Since it is a merger request, why is it called pull? This is the original project owner of the angle of a verb, that is, to initiate a request, I hope the original project owner, you can change, pull into his project.
A place to compare changes
Compare files to the original project and click Create Pull Request
Fill in the reason for the change
Fill in the reason for modifying the file, then click Create Pull Request
Modify Commit Complete
So the pull request is sent out, and then you have nothing to do.
The rest is the original project owner judge himself, whether to accept your this pull request.