From 13f944eacc553258c98b373b78b5701e64319fef Mon Sep 17 00:00:00 2001 From: baiobelfer Date: Tue, 2 Sep 2025 10:23:36 +0200 Subject: [PATCH] refactor: simplify Git basics instructions for students Co-authored-by: aider (openrouter/qwen/qwen3-coder) --- z1.txt | 71 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 35 insertions(+), 36 deletions(-) diff --git a/z1.txt b/z1.txt index 0d9255f..7beffb9 100644 --- a/z1.txt +++ b/z1.txt @@ -1,103 +1,102 @@ z1 z2 -Pewnie! Poniżej masz uproszczone instrukcje do tematu **2.2 Podstawy Gita – rejestrowanie zmian w repozytorium**. +Sure! Below are simplified instructions for the topic **2.2 Git Basics – Recording Changes in the Repository**. -# 2.2 Rejestrowanie zmian w Git +# 2.2 Recording Changes in Git -## Cel +## Goal -Nauczysz się: +You will learn to: -* sprawdzać stan repozytorium, -* dodawać pliki do poczekalni, -* zatwierdzać zmiany, -* przeglądać różnice. +* Check the repository status +* Add files to staging area +* Commit changes +* View differences --- -## Słowniczek +## Glossary -* **Śledzony** – plik był w ostatnim commicie -* **Nieśledzony** – plik nowy dla Gita -* **Poczekalnia** – lista zmian, które wejdą do najbliższego commita -* **Commit** – zapisana migawka projektu +* **Tracked** – file was in the last commit +* **Untracked** – new file for Git +* **Staging area** – list of changes that will go into the next commit +* **Commit** – saved snapshot of the project --- -## Najważniejsze polecenia +## Key Commands -### 1) Sprawdź status +### 1) Check status ```bash git status ``` -### 2) Dodaj do poczekalni +### 2) Add to staging area ```bash -git add nazwa_pliku +git add filename ``` -### 3) Zobacz różnice +### 3) View differences -* **Zmiany poza poczekalnią**: +* **Changes not in staging area**: ```bash git diff ``` -* **Zmiany w poczekalni**: +* **Changes in staging area**: ```bash git diff --staged ``` -### 4) Zatwierdź zmiany +### 4) Commit changes ```bash -git commit -m "Opis zmian" +git commit -m "Description of changes" ``` --- -## Prosty workflow +## Simple workflow -1. **Sprawdź status**: `git status` -2. **Dodaj do poczekalni**: `git add ` -3. **Commit**: `git commit -m "Opis"` +1. **Check status**: `git status` +2. **Add to staging area**: `git add ` +3. **Commit**: `git commit -m "Description"` --- -## Ćwiczenie (10 min) +## Exercise (10 min) -1. **Utwórz repozytorium** +1. **Create a repository** ```bash git init git-lesson cd git-lesson ``` -2. **Stwórz i zakomituj plik** +2. **Create and commit a file** ```bash -echo "Witaj Git!" > README.md +echo "Hello Git!" > README.md git add README.md -git commit -m "Dodaj README" +git commit -m "Add README" ``` -3. **Modyfikuj plik** +3. **Modify the file** ```bash -echo "Druga linia" >> README.md +echo "Second line" >> README.md git status git diff git add README.md -git commit -m "Dodaj drugą linię" +git commit -m "Add second line" ``` -4. **Sprawdź historię** +4. **Check history** ```bash git log --oneline ``` -