git-Modify someone else's code _git

Source: Internet
Author: User
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.

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.