如何正确地给 github 的开源项目提交 pull request
具体一些,比如 fork 之后创建几个分支,修改后如何和原项目同步,谢谢
大家讲道理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:
After modification, there is no need to synchronize the modifications to the original warehouse first?
When synchronizing, I directly pull
吗?冲突不让拉取如何解决?(当然可以 fetch
再 merge
or something)
I think the correct way to open it is:
fork
Original warehouse
clone
Own warehouse
at master
分支添加原始仓库为远程分支 git remote add upstream 远程仓库
Fork development by yourself, such as dev
分支开发:git checkout -b dev
Local dev
Submit
Switch master
分支,同步原始仓库:git checkout master
, git pull upstream master
Switch the local dev
分支,合并本地 master
branch and merge the local master
branch (already synchronized with the original repository), you may need to resolve conflicts
Submit local dev
分支到自己的远程 dev
branch to your own remote
pull request
Now we are sending
迷茫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