.gitignore
秘密情報と生成物の除外。
.gitignore
方針
- コミットすべき:
.cursor/rules//AGENTS.md/CLAUDE.md/ 共有.claude/skills//.agents/skills//.codex/config.toml* /.env.example/ Docker 関連 /Makefile - コミットしない:
.env実体 / シークレット / キャッシュ / ビルド成果物 / 個人 IDE 設定 - テンプレは github/gitignore を組み合わせる
.gitignore として
# === OS ===
.DS_Store
Thumbs.db
*.swp
*~
# === エディタ / IDE ===
.vscode/*
!.vscode/settings.json # チーム共有設定だけはコミット (任意)
!.vscode/extensions.json
.idea/
*.iml
.fleet/
.zed/
# === Cursor / Claude Code / Codex ===
# .cursor/rules/ / AGENTS.md / CLAUDE.md / 共有する .claude/* / .agents/skills/ はコミット対象
.cursor/*
!.cursor/rules/
# Claude Code の共有設定だけ復活
.claude/*
!.claude/skills/
!.claude/agents/
!.claude/settings.json
# Codex: プロジェクト設定と共有 Skill(.codex/ は trusted 時のみ読込)
.codex/*
!.codex/config.toml
!.agents/
!.agents/skills/
# AI 関連の他ツールのローカル
.specstory/
.aider*
# === 環境変数 / シークレット (絶対コミットしない) ===
.env
.env.local
.env.*.local
.env.development
.env.production
# テンプレート類はコミット
!.env.example
!.env.sample
# クラウド credentials
*.pem
*.key
*.p12
*.pfx
credentials.json
service-account*.json
.aws/
.gcloud/
# === ログ・実行成果物 ===
*.log
logs/
tmp/
*.pid
*.seed
# === カバレッジ・キャッシュ ===
.coverage
.coverage.*
htmlcov/
coverage.xml
coverage/
.nyc_output/
.pytest_cache/
.mypy_cache/
.ruff_cache/
.tox/
.cache/
# === Docker (ローカルマウント先) ===
.docker-data/
postgres-data/
mysql-data/
redis-data/
# 個人カスタマイズ用 override は gitignore (雛形は .example で配布)
docker-compose.override.yml
# === 一時 / 個人作業 ===
.scratch/
.notes/
*.bak
設定の詳細
言語別追加分
Python
__pycache__/
*.py[cod]
*$py.class
*.egg-info/
.eggs/
build/
dist/
.venv/
venv/
.python-version
.ipynb_checkpoints/
Node.js / Next.js
node_modules/
.next/
out/
.turbo/
.nuxt/
dist/
build/
.parcel-cache/
.pnpm-store/
.yarn/cache
.yarn/install-state.gz
*.tsbuildinfo
Go
# vendor/ をコミットするかは方針次第 (CI のオフライン化を重視するなら commit)
# vendor/
bin/
*.exe
*.test
*.out
coverage.out
NOTE:
!(再含有)は親ディレクトリ自体が無視されていない場合のみ有効。.cursor/*+!.cursor/rules/は機能する。.cursor/や.claude/をディレクトリごと無視すると!が効かない。