Pull requests
Figure 4 shows a gate between a branch road and the main road. The barrier is the review. The lamp is the state of the review.
The problem
Your branch is on your copy of the repository. The main branch is on the server. You cannot write to the main branch of the server. A pull request asks the owner of the server to merge your branch.
The gate
The wagons D and E wait at the barrier. The barrier is down. The lamp is off. The wagons cannot go to the main road.
A person examines your changes. This person is the reviewer. The reviewer can ask for changes. The reviewer can approve the pull request.
After the approval
The reviewer approves the changes. The barrier goes up. The lamp comes on. The wagons go to the main road. Git makes a merge commit on the main branch. The merge commit M has the parents C and E.
Use the figure
- Click the button on the desk, or press the Space key.
- The barrier goes up.
- The wagons go to the main road.
- The merge commit M appears.
GitHub
GitHub is a server for git repositories. GitHub gives the pull request, the review, and the merge button. The operation is the same on other servers.