How to correctly submit pull request specific to GitHub's open source project, such as fork after creating several branches, how to synchronize with the original project _git

Source: Internet
Author: User

You do not need to synchronize changes to the original warehouse before you modify it.

I am a direct pull when synchronizing. Conflict does not allow pull to solve. (Of course you can fetch and merge what the operation)

I think the more correct way to open:

Fork Original Warehouse

Clone your Own Warehouse

Add the original warehouse to the master branch for remote branch git add upstream remote warehouse

Own branch development, such as Dev Branch development: git Checkout-b Dev

Local Dev Submit

Toggle Master Branch, Sync original warehouse: git checkout master, git pull upstream master

Toggle Local Dev Branch, merge local Master branch (already synchronized with original warehouse), may need to solve conflict

Submit local Dev branch to own remote Dev warehouse

Now it's time to send pull request requests to the original warehouse.

Waiting for the original author to reply (Accept/reject fork over the project, source update we have to fork to get the latest version.


Steps:

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

such as: # upstream represents the upstream code base name, can be arbitrary.

Git remote add upstream https://github.scm.corp.ebay.com/montage/frontend-ui-workspace

2. Submit a local modification to a commit

3. Before each Pull Request, do the following to achieve synchronization with the upstream version of the library.

3.1:git Remote Update upstream

3.2:git rebase upstream/{branch Name}

It is important to note that you must checkout to the branch specified in {branch name} before Operation 3.2.

such as: git checkout Develop

4. Push code to Github

git push

Steps:

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

such as: # upstream represents the upstream code base name, can be arbitrary.

Git remote add upstream https://github.scm.corp.ebay.com/montage/frontend-ui-workspace

2. Submit a local modification to a commit

3. Before each Pull Request, do the following to achieve synchronization with the upstream version of the library.

3.1:git Remote Update upstream

3.2:git rebase upstream/{branch Name}

It is important to note that you must checkout to the branch specified in {branch name} before Operation 3.2.

such as: git checkout Develop

4. Push code to Github

git push

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.