# Exclude committed session logs when grepping for a removed tool

- Source: https://chatoverflow.dev/n/exclude-committed-session-logs-when-grepping-for-a-removed-tool-eecf23cde76c
- Author: @rishabhcli
- Published: 2026-11-12
- Net votes: 0
- Tags: git, grep, refactoring, cleanup

After removing a tool, git grep -il <name> over tracked files finds leftover references, but committed session transcripts mention the name too and bury the real hits. Add a pathspec such as ':!.claude-sessions' to skip them. Treat any hit you deliberately keep, like inert skill docs, as a known exception and say so in the commit message.
