search

Home  >  Q&A  >  body text

如何正确地给 github 的开源项目提交 pull request

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

phpcn_u1582phpcn_u15822765 days ago549

reply all(2)I'll reply

  • 大家讲道理

    大家讲道理2017-05-02 09:39:48

    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 directly pull 吗?冲突不让拉取如何解决?(当然可以 fetchmerge or something)

    I think the correct way to open it is:

    1. fork Original warehouse

    2. clone Own warehouse

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

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

    5. Local dev Submit

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

    7. Switch the local dev 分支,合并本地 master branch and merge the local master branch (already synchronized with the original repository), you may need to resolve conflicts

    8. Submit local dev 分支到自己的远程 dev branch 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)
    🎜

    reply
    0
  • 迷茫

    迷茫2017-05-02 09:39:48

    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

    reply
    0
  • Cancelreply