The Life Starter
0 of 6 complete0%
Course Library · Lesson 4 of 6
Digital · Guided lesson

Merge independent contributions

About 36 minutes · 6 reading + 30 practice and checks
Time includes reading, practice, and questions. Extra videos or further study are optional.
See this course’s project requirements

A local repository with a readable change history, two merged contributions, a resolved practice conflict, and an evidence-based review note.

Keep your working files in your own notebook or software. Save a private description, checklist, and work link in My Proof.

What to include

  • Base and clarification commits.
  • Review note grounded in an actual diff.
  • Merged independent title contribution.
  • Resolved hours conflict using the approved policy.
  • Final files, history evidence and recovery note.

Review and revise

Use these criteria to check your work and choose what to improve.

  • History records meaningful changes.
  • Final notice matches all four required lines.
  • Conflict resolution retains unrelated content.
  • Review and recovery claims are accurate.
Open the full course project
Want more background?
Before you begin

The idea in everyday life

The cafe needs a clearer event title while another contribution clarifies what to bring.

The idea

A branch names a line of commits; a merge brings compatible histories together.

Follow along

Merge independent contributions — guided practice

Use a branch to develop an isolated change and merge it.

Continue with main at two commits and untracked review.md. Keep review.md untouched. notice.txt has four lines.

  1. 1. Create a branch and edit

    Run the switch command first. Then stop in the terminal: open notice.txt in your editor, change Repair Cafe to Neighborhood Repair Cafe, and save before continuing.

    git switch -c title-update

    You should see: title-update is active and the saved file has the revised title.

    The branch must be active before you make its intended edit.

  2. 2. Commit the branch edit

    After saving the title change, inspect its diff, then stage and commit notice.txt.

    git diff -- notice.txt
    git add notice.txt
    git commit -m "Name the neighborhood event"

    You should see: The branch contains a commit with the revised title.

    The explicit edit-and-save pause prevents an empty commit attempt.

  3. 3. Return to main

    Switch to main and read the first line.

    git switch main

    You should see: It reads Repair Cafe again.

    Switching changes the working files to that branch’s saved state.

  4. 4. Make separate work

    Change Bring: one small item to Bring: one small unplugged item. Save, stage and commit.

    git add notice.txt
    git commit -m "Clarify item preparation"

    You should see: Main now has the unplugged-item clarification.

    Distinct contributions can be developed without overwriting each other.

  5. 5. Merge and inspect

    Merge title-update into main and read the notice.

    git merge --no-edit title-update
    git log --oneline --graph --all

    You should see: Title and Bring changes both appear; Hours stays 10-12.

    Compatible edits combine; inspect the result rather than assuming it is right.

Now change one thing

Main says Color: blue and a branch changes a different line from Size: 2 to Size: 3. After merging, what is the Size value?

Your work

What to finish

A merged title branch and an annotated history view.

Common mistake

Watch for this

Editing a file before switching without checking status can carry unintended work between branches.

How can I tell I understand it?

Complete the changed case, explain your result, and pass the three application checks.

Try 3 questions

Quick knowledge check

Answer all 3 questions. Get at least 2 right and the lesson completes automatically.

Not yet passed

You’ll get an explanation for each answer. Signed in? Your results save to your account.

1Two branches change different unrelated files from the same base. What is the expected merge behavior?
2You switch from a committed feature branch to main. Why does the new heading disappear?
3A merge completes without conflict. What should a teammate do next?
0 of 3 answeredApply the lesson to a short question, then review the explanation.
4
Finish this lesson

Pass the check. We’ll save the progress.

Answer all 3 questions above and get at least 2 right. You can review the explanations and try again.

Go to the knowledge check
Optional course overview video · same video as Lesson 1
Missing SemesterLecture 6: Version Control (git) (2020)YouTube
Optional course overview

Lecture 6: Version Control (git) (2020)

From Missing Semester. Watch here or open it on YouTube .

Optional course overview. Follow the written steps below at your own pace.
Tools, templates, and lesson sources

Tools and templates

Tools open in a new tab so you can keep your place here.

Sources and further reading

Explore the references behind this lesson.

MIT Missing Semester: Version Control (Git)
Source & access notes · checked 2026-09-12

Opened and inspected on 2026-09-12: Snapshots, staging, branch histories and collaboration.

Access: Free public web page; no paid enrollment required.

Reuse: CC BY-NC-SA; optional link only, no adapted prose or source exercises.

Pro Git: Basic Branching and Merging
Source & access notes · checked 2026-09-12

Opened and inspected on 2026-09-12: Branch creation and resolving conflicting edits.

Access: Free public web page; no paid enrollment required.

Reuse: CC BY-NC-SA 3.0 book; link only.

Report a problem with this lesson

Tell us what went wrong. Please leave out personal information and private project contents.

No sign-in needed.