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

Save, stage, commit

Saving changes the file. Staging selects contents for the next commit. Committing creates a version in history.

Learning paths12 min

Let's discover together

  1. 1

    In the workshop, create ideas.txt as UTF-8 plain text, with sensor on one line. Save it; make sure it is not named ideas.txt.txt. Git does not track the file yet.

  2. 2

    git status --short -- ideas.txt shows ?? for a new untracked file. -- separates options from paths. git add ideas.txt stages a copy of the current contents for the next commit.

  3. 3

    After add, A in the first column means staged addition. git diff --staged shows selected contents. Then git commit -m "Start idea notebook" records that local version. The message explains the purpose of the change.

  4. 4

    Editing after add does not automatically update staged contents. Review and repeat add if the edit should be included. This course selects files by name so you understand each commit.

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 status --short -- ideas.txt
git add ideas.txt
git diff --staged
git commit -m "Start idea notebook"
git status

Official links and next step

✦
YOUR MISSION

Distinguish the working file, staging and commit.

Now it's your turn

Discovery workshop

Read the state, choose the next step

ideas.txt has just been saved with the line sensor, but has never been committed. Compare status before add with status immediately afterwards. Neither scenario commits. Outputs are prepared.
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

What does a commit record?

I need a hint

Saving, adding and committing are three different steps.

Loading your journey…

Take it with you

Make your first commit. Then append motor on a second line, save and inspect git status before staging again. Explain where each version lives.

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.