Rullst AcademyRullst Academy/Lesson
Git: every change counts · Lesson 07 / 10

Resolve a conflict thoughtfully

Two ideas changed the same line. Git asks for a human decision about the intended result.

Learning paths18 min

Let's discover together

  1. 1

    Do this only in a clean workshop. Create experimento; change the first sensor line to sensor azul and commit. Return to main; change the same line to sensor verde and make another commit.

  2. 2

    On main, git merge experimento finds the incompatible edits. git status --short -- ideas.txt shows UU. The merge is in progress and needs resolution; this is not the time to push.

  3. 3

    Open ideas.txt. Markers <<<<<<<, ======= and >>>>>>> delimit alternatives. Read them and replace the whole section with sensor azul e verde, keeping other lines. Remove markers and save; deleting only markers without review can combine incorrect content.

  4. 4

    Inspect the file, git add ideas.txt, review diff --staged and finish with commit. To abandon the merge, git merge --abort attempts to restore the prior state; starting clean makes this predictable. Do not use abort after completing the merge.

GIT · .md

Your change laboratory

This page’s experiments show prepared outputs. To run real commands, use a new practice folder on your computer and the guide included in “Download activity”. Read the instructions before each command.

My files and GitHub

The editor below saves your Markdown notes in this browser. Download a copy to take them to another device. Sending that file to GitHub does not send your computer’s .git history.

FROM LESSON TO PRACTICE

A guide to follow at your pace

Read the steps before using the reference below. Commands run in the indicated system’s terminal; signup happens on the official site. Rullst Academy exercises are practice and do not verify your installation or external account.

git switch -c experimento
# Change the first line to sensor azul; save.
git add ideas.txt
git commit -m "Try blue sensor"
git switch main
# Change the first line to sensor verde; save.
git add ideas.txt
git commit -m "Try green sensor"
git merge experimento
# Resolve in the editor, then inspect and continue.
git add ideas.txt
git diff --staged
git commit -m "Resolve sensor description"

Official links and next step

✦
YOUR MISSION

Identify markers, choose final contents and finish a merge.

Now it's your turn

Discovery workshop

Read the state, choose the next step

main committed sensor verde and experimento committed sensor azul on the same first line of ideas.txt. The merge stopped with a conflict. In the second scenario, the learner has already replaced the markers with sensor azul e verde, kept motor and saved; staging and completion remain. Prepared outputs.
Mini experiment

Learning simulation: compare cards and check your predictions. The browser is not compiling Rust or starting a server.

git status --short -- ideas.txt
Build your answers and check when you are ready.
A moment to understand

How should you choose a resolution?

I need a hint

Resolution is a content decision, not just a command.

Loading your journey…

Take it with you

Reproduce and resolve the conflict with fictional data. In your notebook show both intentions and the final decision. As a challenge, repeat in another workshop and try abort before resolving.

At your own pace

My files and GitHub

Every lesson can become your own record: code, notes or a practice plan. Saving a file to GitHub is optional and does not change your XP.

Student guide

The editor and downloads open when this lesson is available to your account. Check access below or return to the track map.

Checking your access to this lesson…

Rullstpetbot

AI can make mistakes. Check the lesson material.