How to submit a pull request to the open source community on github

  1. Do you not need to synchronize the changes of the original repository after the modification?

  2. Am I direct when syncing  pull ? How to resolve conflicts that do not allow pull? (Of course you can  fetch do  merge anything else)

I think the more correct way to open:

  1. fork original warehouse

  2. clone own warehouse

  3. Add the original repository to the  master branch as a remote branch git remote add upstream 远程仓库

  4. Branch development by yourself, such as  dev branch development:git checkout -b dev

  5. local  dev commit

  6. switch  master branch, sync original repository: git checkout mastergit pull upstream master

  7. Switch the local  dev branch, merge the local  master branch (already synchronized with the original repository), may need to resolve the conflict

  8. Submit your local  dev branch to your own remote  dev repository

  9. Now it's time to make a  pull request request to the original repository

  10. Wait for the original author to reply (accept/reject

For a project that has been forked, after the source is updated, we must re-fork to get the latest version?
step:

1. Add the remote source of the upstream code base in the code base of the fork. This operation only needs to be done once.

Such as: where # upstream represents the name of the upstream code base, which can be arbitrary.

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

2. Submit the local changes to commit

3. Do the following before each Pull Request to synchronize with the upstream repository.

      3.1 : git remote update upstream

      3.2 : git rebase upstream/{branch name}

需要注意的是在操作3.2之前,一定要将checkout到{branch name}所指定的branch,

如: git checkout develop

4. Push 代码到 Github


转处:https://blog.csdn.net/lupeng0206/article/details/72828080

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325579614&siteId=291194637