如何正确地给 github 的开源项目提交 pull request
phpcn_u1582
phpcn_u1582 2017-05-02 09:37:48
0
2
509

如何正确地给 github 的开源项目提交 pull request
具体一些,比如 fork 之后创建几个分支,修改后如何和原项目同步,谢谢

phpcn_u1582
phpcn_u1582

reply all (2)
大家讲道理

First of all, thank you for the answer, but I don’t think this is the correct way to open it. I also asked the question because I don’t want to use the above method.
Let me tell you what’s wrong with the above method:

  1. After modification, there is no need to synchronize the modifications to the original warehouse first?

  2. When synchronizing, I directlypull吗?冲突不让拉取如何解决?(当然可以fetchmergeor something)

I think the correct way to open it is:

  1. forkOriginal warehouse

  2. cloneOwn warehouse

  3. atmaster分支添加原始仓库为远程分支git remote add upstream 远程仓库

  4. Fork development by yourself, such asdev分支开发:git checkout -b dev

  5. LocaldevSubmit

  6. Switchmaster分支,同步原始仓库:git checkout mastergit pull upstream master

  7. Switch the localdev分支,合并本地masterbranch and merge the localmasterbranch (already synchronized with the original repository), you may need to resolve conflicts

  8. Submit localdev分支到自己的远程devbranch to your own remote

    warehouse
  9. pull requestNow we are sending

    request to the original warehouse
  10. Waiting for the original author’s reply (accept/reject)
    迷茫

    1: First go to github to fork other people's repo, and then modify it
    2: Then go to your space and click on the project you forked, and then click new pull request

    3: Then it will jump to the original author Under the repo, the pull request interface appears. Just select the branch you want to submit. If there are files to submit, there will be a commit button below. Just fill in the description and then wait for the author to merge

      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!