Skip to content

Instantly share code, notes, and snippets.

@montasim
Last active January 28, 2025 08:51
Show Gist options
  • Save montasim/f33d1941104f48b5e73477ae75519dbc to your computer and use it in GitHub Desktop.
Save montasim/f33d1941104f48b5e73477ae75519dbc to your computer and use it in GitHub Desktop.
This file specifies intentionally untracked files that Git should ignore.
####################################################
# .gitignore Configuration File
####################################################
#
# Version: 1.0.0
# License: CC BY-NC-ND 4.0
#
# Author: Mohammad Montasim-Al-Mamun Shuvo
# Created: 2025-01-28
# Contact Email: [email protected]
# Contact GitHub: https://github.com/montasim
####################################################
# Purpose:
# The .gitignore file is used to specify which files and directories
# should be ignored by Git when committing changes to the repository.
# These exclusions typically involve files that are user-specific,
# generated, or unnecessary for source control, ensuring a clean
# and efficient codebase.
####################################################
# IDE AND CODE EDITOR SETTINGS
####################################################
# Purpose:
# Configuration files generated by IDEs and editors (like .vscode
# or IntelliJ IDEA) are often user-specific and should not be
# committed. This prevents unnecessary clutter in the repository
# and avoids conflicts caused by different user setups.
# JetBrains IDEA/Android Studio project settings.
.idea/
# Visual Studio Code workspace settings.
.vscode/
# macOS-specific file created by Finder for file metadata.
.DS_Store
####################################################
# DEPENDENCY DIRECTORIES
####################################################
# Purpose:
# Dependency management directories like `node_modules` or `.yarn/`
# store installed dependencies. These are often large in size and
# can be regenerated using the package manager (npm, yarn, etc.),
# so they should not be committed.
# Installed Node.js project dependencies.
/node_modules
# Yarn lockfile, cache, and plugin data.
.yarn/
# Plug'n'Play manifest generated by Yarn.
.pnp
# JavaScript file for Yarn's Plug'n'Play feature.
.pnp.js
# Cached install state for Yarn berry.
.yarn/install-state.gz
####################################################
# BUILD OUTPUTS
####################################################
# Purpose:
# Directories for build artifacts and compiled code such as `build/`
# or `.next/` are generated during development or production builds.
# These files should not be versioned as they can be recreated from
# the source code.
# General output folder for build artifacts.
/build
# Next.js build directory.
.next/
# Generic folder for production deployments.
.out/
####################################################
# LOG FILES
####################################################
# Purpose:
# Exclude log files generated during testing, debugging, or local
# application runs. These files contain application information and
# error reporting (yarn/npm logs) and are not useful in version control.
# Generic directory for logs.
logs/
# Any log file (error.log, application.log, etc.).
*.log
# JSON-formatted log files.
logs*.json
# Log file for Docker build processes.
docker.log
# Debug log files created during npm errors.
npm-debug.log*
# Debug logs generated by Yarn during errors.
yarn-debug.log*
# Yarn-specific error logs.
yarn-error.log*
####################################################
# ENVIRONMENT VARIABLE CONFIGURATIONS
####################################################
# Purpose:
# Environment configuration files such as `.env` files often contain
# sensitive information like API keys, database URLs, or other secrets.
# These files should not be committed to prevent unauthorized access
# and to maintain environment-specific configurations locally.
# Default environment variables file.
.env
# Environment variables for development builds.
.env.development
# Environment variables for test environments.
.env.test
# Environment variables for staging servers.
.env.staging
# Environment variables for UAT (User Acceptance Testing).
.env.uat
# Environment variables for production builds.
.env.production
# Local variations of environment files.
.env*.local
####################################################
# TESTING
####################################################
# Purpose:
# Files generated during test runs (e.g., coverage reports) can
# clutter the repository and are not useful in version control.
# These files should be excluded to keep repositories lightweight.
# Test code coverage reports.
/coverage
####################################################
# DOCUMENTATION FILES
####################################################
# Purpose:
# Some generated or large-scale documentation directories might
# not be necessary in the repository. Ignore these to avoid bloating
# the repository with locally generated documentation files.
# General directory for generated documentation.
/documentation
####################################################
# VERCEL CONFIGURATION
####################################################
# Purpose:
# Vercel creates a specific configuration directory used for deployment
# purposes. This folder should not be included in source control as it
# is environment-specific.
# Vercel configuration files.
.vercel
####################################################
# MISCELLANEOUS
####################################################
# Purpose:
# Excludes miscellaneous files that don't fall into other categories
# but are typically unnecessary or sensitive to commit.
# TypeScript incremental build information.
*.tsbuildinfo
# Auto-generated Next.js environment types.
next-env.d.ts
# Private keys or other sensitive PEM files.
*.pem
####################################################
# LOCAL FILE UPLOADS
####################################################
# Purpose:
# Files uploaded by users are stored locally during development.
# These files should not be committed to prevent conflicts or
# unauthorized access to uploaded files.
# User-uploaded files stored temporarily.
/public/assets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment