SAEIt’s time to learn
svnLater, it was found that
GitAdvanced, and then the registration will not be used for a long time
GithubTake out the account number and make trouble. The result is right
pull requestIt’s very confusing.
[last second] pull, isn’t it? It feels like push request is the right way to think.
[next second] Oh! For the author, pull…
That is, they don’t match at all. One is
Let me be more clear. The previous answers and discussions are specious, and they do not point to the truth.
On GitHubpull requestand
git pullIt’s not entirely irrelevant, but the closest thing to it is another command
Let’s start with the conceptual explanation. Maybe most people (including the subject) will understand thispull request：
I, submit a request to integrate my changes into upstream
In this way, the feeling should bepush requestMost appropriate, because this action is completely my initiative!
However, this understanding ignores a premise:Do you have permission to push to upstream?In other words, can you write upstream directly?
There are two cases (corresponding to two git based workflows):
- With authority – then you don’t have tofork & pull requestSince the author gives you permission, you can just clone it and operate it as your repo. Why bother?
- No authority – since no authority, whypush requestOne said?
In the final analysis, the cause of this misunderstanding is not completely clearpull requestHow workflow works. aboutpull requestThe correct description of the action should be as follows:
I, initiate a request (in the case of GitHub, an HTTP request calls the corresponding API, which is then executed by GitHub at the back end
git request-pull, see later), this request(request in HTTP request)It is a request.(request in pull request)The author of the upper reaches(pull in pull request)Changes from my fork.
This is the correct understanding.
Finally, let’s talk about it
git request-pull。 When you makepull requestAt the time of request, what is actually carried out is
git request-pullThis subcommand. The signature of this subcommand is as follows:
$ git request-pull <start> <url> [<end>]
This command generates a summary that contains the change record (in commit units) and the address used to grab the changes. Output the fixed format plain text to stdout, you can redirect and write code for subsequent processing. That’s how GitHub analyzes each onepull requestSo you can see the corresponding commit, time, author and so on.
The upstream author is receivingpull requestLater, if you choose to accept, GitHub calls
git pullTo specify the address (included in
git request-pullIn the generated message) pull the code. The upstream author naturally has the permission to write the upstream repo, so a complete process can be realized.
It is recommended to read git’s official manual, especially this chapter:Distributed git – contribute to the projectAfter reading it, I’m sure you’ll benefit a lot.