1.
Answer the following questions using Figure 4.1.1
(a)
- Red
- Yellow
- Green
- Blue
- Pink
- Lime Green
Which commits (give the colors) were merged into the upstream
main
after the contributor created their local feature branch?Hint.
Look at which commits are in the upstream
main
branch that are not part of the local repository’s main
branch.(b)
- Red
- Red was in
main
prior to the contributor creating the feature branch. - Yellow
- Yellow was in
main
prior to the contributor creating the feature branch. - Green
- Green was in
main
prior to the contributor creating the feature branch. - Blue
- Correct. Blue was part of the contributor’s feature branch.
- Pink
- Pink was part of another contributor’s pull request.
- Lime Green
- Lime green was part of another contributor’s pull request.
Which of the commits did the managers merge from the contributor’s pull request?
Hint.
Look at which commits are in the local repository’s feature branch.
(c)
- The contributor made the pink commit to their feature branch.
- The contributor’s feature branch did not contain the pink commit.
- A maintainer merged the contributor’s pull request.
- The contributor’s pull request contained the blue commit, not the pink commit.
- A maintainer merged a pull request from another contributor which contained the pink commit.
- Correct. The pink commit was part of a feature branch that another contributor submitted via a pull request.
- The pink commit is not part of the upstream
main
. - The pink commit is part of the upstream
main
. It was merged after the pull request that contained the blue commit.
Which of the following statements explains how the pink commit might have gotten into the upstream
main
branch?Hint.
Look at which commits are in the local repository’s feature branch. This shows the changes made by this contributor. Other changes were made by other contributors and accepted by the maintainer as a pull request.