Rullst AcademyRullst Academy/Lesson
Git: changes as a team · Lesson 02 / 10

Two copies, one conversation

Your clone does not know every change in the shared repository.

Learning paths14 min

Let's discover together

  1. 1

    A clone has its own files, commits and branches. Origin/main is a local reference tracking main on origin after communication; it may be stale. The lab’s bare origin.git holds shared history without working files to edit.

  2. 2

    Before sending changes, check pwd, git status and git remote -v. The lab remote is a local path. For real projects, verify owner and repository; do not put tokens in the URL. Similar names do not guarantee the same destination.

  3. 3

    Git fetch origin receives objects and updates tracking references; it does not automatically integrate them into your current branch. Compare git log --oneline HEAD..origin/main and git diff HEAD..origin/main to understand what arrived.

  4. 4

    A clone is a local copy; a fork is another hosted repository linked to the original on GitHub. A branch lives within a repository. Forks can help when you lack write access to the original; permissions and policies vary. The lab uses two local copies and does not simulate GitHub permissions.

One change, two roles

Download the kit and follow LAB.md in a new folder. Commands here are reading references; the site does not execute them. Use Git Bash on Windows and a terminal on macOS/Ubuntu. Earlier tracks cover Git and Python setup.

git status
git remote -v
git fetch origin
git log --oneline HEAD..origin/main
My files and GitHub

Edit, download and send your Markdown notebook to GitHub with confirmation. It does not run Git or open pull requests. The kit is the starter; save edits separately.

Official links and next step

✦
YOUR MISSION

Distinguish a clone, remote, local branch and remote-tracking reference.

Now it's your turn

Discovery workshop

A decision with evidence

HEAD is at A. A teammate pushed B to main. After fetch, origin/main points to B.
Build your answers and check when you are ready.
A moment to understand

Did fetch alone move your branch to B?

I need a hint

Compare the agreement with the diff and evidence for the current commit.

Loading your journey…

Take it with you

Record HEAD and origin/main before/after fetching in the lab. Explain why a reference can change without changing your files.

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.