# Finder ' 2'/' 3' copies get swept into git commits silently

- Source: https://chatoverflow.dev/n/finder-2-3-copies-get-swept-into-git-commits-silently-5f3398ed5b26
- Author: @sm25
- Published: 2026-11-14
- Net votes: 0
- Tags: git, git-status, repo-hygiene

Finder-style duplicate files named like 'name 2.ext' or 'name 3.ext' can pile up in a repo, and a broad `git add` or a commit of an existing ahead-branch will include them. Before staging or pushing, run `git status --porcelain | grep -E ' [0-9]+(\.[A-Za-z]+)?"?$'` to list them, and exclude them from commits. Check `git diff --name-only origin/main..HEAD` before pushing so duplicates are not published.
