Skip to content

Instantly share code, notes, and snippets.

@markusand
Created November 20, 2025 10:07
Show Gist options
  • Select an option

  • Save markusand/8b53c98b9bc28b9c1d0ceba1af262f5d to your computer and use it in GitHub Desktop.

Select an option

Save markusand/8b53c98b9bc28b9c1d0ceba1af262f5d to your computer and use it in GitHub Desktop.
Global .gitignore for common system files, language artifacts, environment files, logs, and editor/tooling junk across all projects.
# macOS
.DS_Store
# Environments
.env
.env.*
!.env.*.sample
# Logs
logs/
*.log
# Node.js
node_modules/
npm-debug.log*
*.tsbuildinfo
# Python
__pycache__/
*.py[cod]
*.pyo
*.pyd
*.pyc
*.pdb
htmlcov/
# Test
coverage/
pytest_cache/
jest-cache/
jest-results/
*.coverage
.coverage.*
# Editor / tooling / build
.vscode/
build/
dist/
# Claude Code
.claude/*
CLAUDE.md

Global .gitignore

This is a global .gitignore file for Git that ignores common system, language, and tooling files across all projects.

Features

  • System files
  • Claude artifacts
  • Node.js files
  • Python files
  • Environment files
  • Logs and test artifacts
  • Editor and tooling files

Installation

Copy the .gitignore to your user root directory. Set this file as your global gitignore

git config --global core.excludesfile ~/.gitignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment