📄 .gitignore

❓ Câu hỏi thường gặp

.gitignore là file cấu hình Git, liệt kê các file/thư mục mà Git sẽ bỏ qua khi commit. Giúp không đưa node_modules, file .env, build artifacts... lên repository.

Mỗi ngôn ngữ/framework tạo ra các file tạm thời, cache, artifact riêng. Ví dụ Python tạo __pycache__, Node.js tạo node_modules. Cần ignore đúng loại file của từng dự án.

Bắt buộc phải thêm. File .env chứa API keys, mật khẩu database, secrets - không bao giờ được commit lên repository công khai vì lý do bảo mật.