๐Ÿ“Š We use cookies & analytics to improve your experience. Learn more
Latest

Cloud, Linux & DevOps Basics Module 2 ยท Lesson 4 of 15

0% Exit to course

Module 2 ยท Git and how code actually ships Lesson 4 of 15

Commits, branches and merge conflicts

Learning objective

A commit is a labelled snapshot; a branch is a movable line of snapshots. A merge conflict is Git refusing to guess which of two edits you meant โ€” and it is normal, not a failure.

Worked example

Two people editing the same line of the same file produce a conflict block with <<<<<<< markers. Resolving it means choosing or combining the two versions and deleting the markers, then committing the result.

Your practice task

Deliberately create a conflict between two branches of your own project and resolve it both ways: keeping one side, then keeping both.

Do this before moving on. Reading a solution teaches the shape of it; typing it teaches you.

Key takeaway

A commit is a labelled snapshot; a branch is a movable line of snapshots. A merge conflict is Git refusing to guess which of two edits you meant โ€” and it is normal, not a failure.

Create free account or sign in

Almost there

15 lessons left of 15

Finish every lesson to unlock the certificate. Each one ends in a practice task โ€” do them and the final project brief writes itself.