It's not only about subjective and objective. It is also logical to say "I request to push" if it is actually a push operation lying behind.
The major reason is that you cannot push
to others' repo. Instead, you have to request them to pull
your branch.
So, why doesn't GitHub allow you to request to push
? Intuitively, this kind of approach also makes sense if the managers are able to choose to accept or refuse my push
, just as how they choose to accept or refuse to pull
my repo.
Let's look at push
first. Say, there are two repos, A and B:
repo A: repoB:
b c
| |
a a
A and B have commit b and c on commit a, respectively.
Then you push
from A to B. There are two kinds of results.
- You
git push
and fail. Because A and B conflict.
- You
git push --force
and success. However, commit c is gone. It becomes
repo A: repoB:
b b
| |
a a
This is not what you want to do, right? So you need to do it other way.
You have to eliminate the conflications before a push
. Say, you have to pull
the upstream repo first and get
repo A: repoB:
d
|\
b c c
|/ |
a a
And then you are able to push
.
This is how a push request system looks like: contributors handle the conflictions first and request to make a push
operation to change the upstream repo. Maybe it seems neat now. The manager of the upstream repo can choose to accept or refuse contributors' push request. Everything works.
However, it only works if there's no other push request.
Say you have just make a push request after pulled the upstream branch and handled the conflictions. You think you are done, but no, in fact. You surprisedly find that the owner of the upstream repo just made a new commit e, when you were pulling codes. Now, the situation becomes:
repo A: repoB:
d e
|\ |
b c c
|/ |
a a
OK. Now you have to pull
the new commits to your repo again and make a new push request. And don't forget that there could be some new codes commited to the upstream... Theoretically you may have to loop forever.
And empiracally, you may finally make a well done push request with no conflication. Congratulations, but there are hundreds of push request. If the owner accept another push request first, you have to pull
and push
again.
Consequently, to make a contribution work neatly, the requested operation must have two parts:
- Eliminate conflictions.
- Combine branch.
And it must be done by the owner. Otherwise, the owner must:
- Approve a contributor's new code.
- Approve the contributor's way of eliminating confliction.
But just as the example, there may be some more conflictions introduced when the contributor is eliminating conflictions.
So, pull
operation is naturally the choice. That's why there's pull
request but no push
request.