Let me be more clear. The previous answers and discussions are specious and do not point to the truth.
pull request and on git pull 并非完全没有关系,不过和它关系最近的则是另外一个命令 git request-pullGithub.
Let’s talk about the conceptual explanation first. Maybe most people (including the subject) will understand it this way pull request:
I submit a pull request to integrate my changes into upstream (which usually represents the source of your fork)
In this case, it feels like push request is the most appropriate, because this action is entirely my initiative!
However, this understanding ignores a premise: Do you have the permission to push to upstream? In other words, can you write upstream directly?
This is divided into two situations (corresponding to two Git-based workflows):
You have permission - then you don’t need to fork & pull request. Since the author has given you permission, you can just clone it and operate it as your own repo. Why bother?
No permission - Since there is no permission, how can I push request?
Ultimately, this misunderstanding stems from not fully understanding how the pull request workflow works. The correct description of the pull request action should be like this:
I initiate a request (in the case of Github, it is an HTTP request that calls the corresponding API, and then Github executes it on the backend git request-pull, see below for details), this request (request in HTTP request) is a request (pull request in request)The upstream author pulls(pull in pull request)from the changes in my fork.
This is the correct understanding.
Finally, let’s talk git request-pull。当你做出 pull request 请求的时候,其实背后执行的是 git request-pull. When you make a
pull request
request, the subcommand is actually executed behind the scenes. The (main) signature of this subcommand is as follows:
bash$ git request-pull <start> <url> [<end>]
This command generates a summary that contains the change record (in commits) and the address used to fetch these changes. The summary is output to stdout in fixed-format plain text, which you can redirect and write code for subsequent processing. This is how Github analyzes each
pull request, so you can see the corresponding commit, time, author and other information. git pull 去指定地址(包含在 git request-pullIf the upstream author chooses to accept the
pull request
after receiving it, Github will call git pull to pull the code at the specified address (included in the information generated by
). The upstream author naturally has permission to write to the upstream repo, so a complete process can be realized. 🎜
🎜It is recommended to read the official Git manual, especially this chapter: Distributed Git - Contributing to the project. I guarantee you will benefit a lot after reading it. 🎜
It’s a public library, right? You pull your modifications to this library, and then the author of this library can see your request and decide whether to merge you into his original library.
Let me be more clear. The previous answers and discussions are specious and do not point to the truth.
pull request and on
git pull
并非完全没有关系,不过和它关系最近的则是另外一个命令git request-pull
Github.Let’s talk about the conceptual explanation first. Maybe most people (including the subject) will understand it this way pull request:
In this case, it feels like push request is the most appropriate, because this action is entirely my initiative!
However, this understanding ignores a premise: Do you have the permission to push to upstream? In other words, can you write upstream directly?
This is divided into two situations (corresponding to two Git-based workflows):
Ultimately, this misunderstanding stems from not fully understanding how the pull request workflow works. The correct description of the pull request action should be like this:
This is the correct understanding.
Finally, let’s talk
pull requestgit request-pull
。当你做出 pull request 请求的时候,其实背后执行的是git request-pull
. When you make arequest, the subcommand is actually executed behind the scenes. The (main) signature of this subcommand is as follows:
This command generates a summary that contains the change record (in commits) and the address used to fetch these changes. The summary is output to stdout in fixed-format plain text, which you can redirect and write code for subsequent processing. This is how Github analyzes eachpull request, so you can see the corresponding commit, time, author and other information.
pull requestgit pull
去指定地址(包含在git request-pull
If the upstream author chooses to accept theafter receiving it, Github will call
). The upstream author naturally has permission to write to the upstream repo, so a complete process can be realized. 🎜 🎜It is recommended to read the official Git manual, especially this chapter: Distributed Git - Contributing to the project. I guarantee you will benefit a lot after reading it. 🎜git pull
to pull the code at the specified address (included in the information generated byIt’s a public library, right? You pull your modifications to this library, and then the author of this library can see your request and decide whether to merge you into his original library.