{ "id": "git-everyday-basics", "title": "Init, Track, Commit — Your First Real Repository", "category": "Git", "isolation_type": "shared_namespace", "difficulty": "Easy", "type": "task", "weight": 4, "description": "## Init, Track, Commit — Your First Real Repository\n\n**Your task**, inside `/srv/git-lab-everyday/`:\n\n1. Initialize a new Git repository\n2. Create a file named `notes.txt` containing any text you like\n3. Stage and commit it, with a commit message that includes the word `notes`\n4. Confirm your work with `git log` and `git status`", "hints": [ { "title": "The full sequence", "body": "`git init` creates the repository. `git add` stages a file (moves it from working tree to staging area). `git commit` records the staged snapshot permanently.", "command": "cd /srv/git-lab-everyday\ngit init\necho 'my first notes' > notes.txt\ngit add notes.txt\ngit commit -m 'Add notes file'" } ], "setup_commands": [ { "command": "mkdir -p /srv/git-lab-everyday" }, { "command": "git config --global user.email student@rootnode.local" }, { "command": "git config --global user.name 'RootNode Student'" } ], "validation": { "commands": [ { "description": "a real Git repository was initialized", "command": "git -C /srv/git-lab-everyday rev-parse --is-inside-work-tree 2>/dev/null", "expected_output": "true", "match": "exact" }, { "description": "at least one commit exists", "command": "git -C /srv/git-lab-everyday log --oneline 2>/dev/null | wc -l | tr -d ' '", "expected_output": "^[1-9][0-9]*$", "match": "regex" }, { "description": "notes.txt is tracked in the latest commit", "command": "git -C /srv/git-lab-everyday show --name-only --format= HEAD 2>/dev/null", "expected_output": "notes.txt", "match": "exact" }, { "description": "the commit message mentions notes", "command": "git -C /srv/git-lab-everyday log -1 --pretty=%s 2>/dev/null", "expected_output": "notes", "match": "contains" } ] }, "default_namespace": "default", "teardown_commands": [ { "command": "rm -rf /srv/git-lab-everyday" } ] }