2.3 KiB
2.3 KiB
Context
The project currently lacks a .gitignore file, which results in various development-related files, build artifacts, and dependency directories being untracked or potentially committed to version control. This leads to a cluttered repository and can cause issues with consistency across different development environments.
Goals / Non-Goals
Goals:
- Create a comprehensive
.gitignorefile at the project root. - Ensure that common development artifacts, temporary files, dependency directories, and OS/IDE-specific files are ignored by Git.
- Maintain a clean and focused Git repository.
Non-Goals:
- This design does not aim to modify existing Git history or remove already committed files.
- It does not cover advanced Git configurations beyond the
.gitignorefile itself. - It will not address ignoring files that are intentionally part of the repository (e.g., configuration files that need to be tracked).
Decisions
- Location: The
.gitignorefile will be placed in the root directory of the project (/home/filip/docker-backend-display/.gitignore). - Content - General: It will include standard ignore patterns for:
- Node.js specific files and directories (
node_modules,npm-debug.log,build,dist, etc.). - Operating System specific files (
.DS_Store,Thumbs.db). - Common IDE/Editor specific files (
.vscode/,.idea/,*.swp).
- Node.js specific files and directories (
- Content - Project Specific: It will include patterns for:
- Backend build artifacts (if any are generated outside
node_modules). - Frontend build artifacts (
frontend/build). - Log files (
*.log). - Environment variables (
.env).
- Backend build artifacts (if any are generated outside
Risks / Trade-offs
- [Risk] Over-ignoring essential files: There is a risk that some files necessary for the project's build or execution might be inadvertently ignored.
- Mitigation: The
.gitignorefile will be carefully reviewed after creation, and tested by checkinggit statusto ensure only intended files are ignored.
- Mitigation: The
- [Risk] Under-ignoring sensitive or large files: Some sensitive information or large binary files might be missed, leading to them being committed.
- Mitigation: The
.gitignorewill be based on widely accepted templates for Node.js/React projects, and specific project directories will be explicitly added.
- Mitigation: The