为什么将自己修改内容上传到主分支叫pull request,而不是push request?
这里有很多用户对这一问题分享了自己看法,我简单罗列下:
https://stackoverflow.com/questions/21657430/why-is-a-git-pull-request-not-called-a-push-request
1、Picture a big, living tree. The tree is too sturdy for you to push a branch into in, instead you must ask the tree to pull a branch into the trunk, strengthening it.
2、If you have a code change in your repository, and want to move it to a target repository, then:
“Push” is you forcing the changes being present in the target repository (git push).
“Pull” is the target repository grabbing your changes to be present there (git pull from the other repo).
A “pull request” is you requesting the target repository to please grab your changes.
A “push request” would be the target repository requesting you to push your changes.3、When you send a pull request, you’re asking (requesting) the official repo owner to pull some changes from your own repo. Hence “pull request”.
大概意思就是,push指我们直接将修改内容push到指定分支中,而如果想要自己修改内容被合并到主分支中,就需要pull request,这个拉取请求是对主分支发起的,希望主分支能将自己的修改拉去到主分支中。