The core idea
Git tracks changes to files inside one project folder. A commit is a saved snapshot of selected changes, with a message that explains why you saved it.
Git does not understand your app like a human. It only sees file paths, file contents, and changes between snapshots.
Why this matters
A recruiter may open your GitHub repo before they meet you. Your commits should show steady, understandable work, not one giant upload at 3 am before submission.
To get there, you first need to know what Git notices. It notices when a tracked file changes. It notices new files. It notices deleted files. It ignores files you tell it to ignore.
The three areas
Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.
0 of 3 done
See what Git sees
In any Git repo, these commands answer the two most useful questions: what changed, and what exactly changed.
Run them before you commit. This habit prevents broken setup files, secrets, and random test code from entering your public repo.
git status
git diff
git add app.js README.md
git status
git diff --stagedCommon wrong idea
Many beginners think git add uploads code to GitHub. It does not. It only stages changes on your own laptop.
Nothing goes to GitHub until a later lesson, when you push to a remote repo. For now, think local only: edit, stage, commit.
Use AI carefully
If you ask ChatGPT or Gemini for Git help, paste the output of git status, not your whole private project. Ask: “What is safe to commit here?”
Check the answer yourself. AI can miss secrets, generated files, or large folders. Never commit .env, API keys, database dumps, or node_modules.
Files to ignore
A .gitignore file tells Git which files should usually stay out of commits. This is important for public HackIndia projects because strangers should get source code, not your machine clutter.
Here is a simple example for many JavaScript projects.
node_modules/
.env
.DS_Store
dist/
coverage/Do this now
Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.
0 of 5 done