Stage the Right Files
Use the staging area to commit only what you mean to.
A beginner Git challenge worth 3 points. Solve it hands-on in a real Git environment in your browser - no local setup, no fake shells.
The Challenge
Scenario: A fresh repo in /tmp/work has three files: app.txt, README.md, and secret.key.
The secret must never be committed.
Tasks:
- Stage and commit only
app.txtandREADME.md - Do not stage
secret.key
Commands to learn: git status, git add <file>, git commit
Run check when done.