Git fork Project code with upstream synchronization

Source: Internet
Author: User

1. Add the remote source of the upstream code base to the Fork's code base, which can only be done once.

# upstream represents the upstream code base name and can be arbitrary.

Git remote add upstream "git address"

2. Commit the local changes to commit

Git commit

3. Synchronize with the upstream repository by doing the following before each pull Request.

3.1:git Remote Update upstream

3.2:git rebase upstream/{branch Name}

PS: Before Operation 3.2, to checkout to the branch specified by {branch name},

such as: git checkout Develop

4. Push code to Github

git push

If there is a conflict in the synchronization process:

can use

git status//view conflicting files

After resolving the conflict, then

git rebase--continue//Continue syncing


Git fork Project code with upstream synchronization

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.