One safe rule
Start Git at the root of one project, then keep private, generated, and machine-specific files out of commits.
A recruiter should see source code, setup files, and docs. They should not see your .env, node_modules, venv, build output, or personal editor settings.
Choose the root
The repo root is the main folder for your project. It is usually the folder that contains package.json, requirements.txt, pyproject.toml, or your main app folder.
Do not run git init in your Desktop, Downloads, college lab folder, or inside a folder that already has another .git folder.
Check before init
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
Safe first setup
This example is for a Node project. The same idea applies to Python, Java, Flutter, or any stack: ignore installs, secrets, logs, and build output.
cd my-college-project
git init
cat > .gitignore <<'EOF'
# installs
node_modules/
# secrets
.env
.env.local
# logs
*.log
# build output
dist/
build/
# OS and editor files
.DS_Store
.vscode/
EOF
git statusDo not commit secrets
A .env file often has API keys, database URLs, JWT secrets, or payment keys. If it reaches a public GitHub repo, assume it is leaked.
Instead, commit a sample file that shows the names of required variables without real values.
.env.example
MONGODB_URI=
JWT_SECRET=
RAZORPAY_KEY_ID=
RAZORPAY_KEY_SECRET=Use AI carefully
You can ask ChatGPT, Gemini, or Claude to create a .gitignore for your stack. Give it your tech stack and folder names.
Check the result before using it. It should not ignore real source folders like src, app, pages, components, or backend. It should ignore dependency folders, build output, logs, and local secrets.
Prompt:
Create a .gitignore for a MERN project with React in client and Express in server. We use .env files in both folders. Do not ignore source code.Make first commit
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 4 done
git status
git add .gitignore README.md package.json package-lock.json src server client
git commit -m "chore: initialise project repo"
git statusDo 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