Kusina: Carla joins
Last updated
Ana's cousin Carla wants to help type up Lola Remy's notebook. In this project you'll put Kusina on the hosting site, review and merge Carla's first pull request, and then settle her second one, which clashes with a change you made yourself.
By the end of this lesson you can
- Put an existing repository on a host and push it
- Review and merge a teammate's pull request
- Settle a pull request's conflict by merging main into its branch
The brief
You're Ana, in kusina. The family wants a fresh shared copy of Kusina for Carla to join, and an empty repository is waiting on the host.
- Connect Kusina to it as origin and push main. As soon as you do, Carla clones it and opens a pull request.
- Review Carla's pull request #1: read the recipe, comment, approve, merge. Pull it into your main.
- Carla then opens #2, changing the salt in the adobo to 2 tsp. Before you look at it, Lola Remy phones you: 1 1/2 tsp. Change the adobo on your main to say that, commit and push.
- Now #2 can't be merged: it conflicts with your change. Call Lola back: she settles on 2 tsp after all. Fetch, switch to Carla's branch
adobo-salt, merge main into it, settle the conflict, commit and push. Then merge #2 on the host, and pull.
Build it
- Kusina on the host, with main pushed
- Pull request #1 reviewed and approved
- #1 merged, and in your main
- Your 1 1/2 tsp change pushed to main
- Carla’s branch with main merged in and the conflict settled, pushed
- #2 merged on the host, and pulled into your main
Working folder
no changes
Staging area
nothing staged
Repository
10 commits on main
You are in ~/kusina. An empty repository is waiting on the hosting site at https://example.com/ana/kusina.git.
Commit graph
67e435dHEAD →main Cover the leche flan with foilba04ca2Add lumpiang shanghai recipe98a5edcAdd a script that builds the index paged078487Make the sinigang steps clearer145dc1eAdd pancit bihon recipe52d1f4dSay how much salt goes in the adobo1c17fadAdd a README9c53888Add leche flan recipe1f359a2Add sinigang recipe601c654Add adobo recipe
On the hosting site: example.com/ana/kusina
Branches: none yet
If the host says "This branch has conflicts that must be resolved", that's step 4 of the brief. Hosts can also settle simple conflicts on the site; doing it in your own copy works everywhere and lets you test the result.
Spot the trap: approving without reading
Carla’s pull request is titled “Add kare-kare recipe”. Ana is busy. She clicks Approve and Merge without opening Files changed.
What happens if…
Check your history
Run git log --oneline --graph -8. You should see Carla's kare-kare arriving through the first merge commit, and a second loop where her salt branch, with your main merged into it, joins main.
Sources
Every command on this page behaves as these pages describe, and the sandbox prints what Git 2.55 prints. Hosting features (pull requests, protected branches) come from the host’s own documentation.
- GitHub Docs: Resolving a merge conflict on GitHub: the same conflict, settled on the site instead
- GitHub Docs: Reviewing proposed changes in a pull request: reading every changed line
- Pro Git: Maintaining a Project: taking in contributions