ਇੱਕ .gitignore ਫਾਈਲ Git ਨੂੰ ਦੱਸਦੀ ਹੈ ਕਿ ਕਿਹੜੀਆਂ ਫਾਈਲਾਂ ਅਤੇ ਡਾਇਰੈਕਟਰੀਆਂ ਨੂੰ ignore ਕਰਨਾ ਹੈ — ਵਰਜਨ ਕੰਟਰੋਲ ਵਿੱਚ ਟਰੈਕ ਨਹੀਂ ਕਰਨਾ। ਇਸ ਦੀ ਵਰਤੋਂ ਉਤਪਨ ਫਾਈਲਾਂ, dependencies, secrets, ਅਤੇ environment-specific ਫਾਈਲਾਂ ਨੂੰ ਬਾਹਰ ਕਰਨ ਲਈ ਕੀਤੀ ਜਾਂਦੀ ਹੈ ਜਿਹਨਾਂ ਨੂੰ commit ਨਹੀਂ ਕਰਨਾ ਚਾਹੀਦਾ।
.gitignore ਕੀ ਕਰਦਾ ਹੈ
# .gitignore — patterns of files Git should NOT track
node_modules/ # dependencies (reinstalled from package files, don't commit)
dist/ # build output (generated, don't commit)
*.log # log files
.env # ⚠️ SECRETS / environment variables — NEVER commit!
.DS_Store # OS-specific junk
.vscode/ # editor config (often personal)
build/
coverage/
*.tmp
