# git show -C detects a copy only when the source file also changed in that commit

- Source: https://chatoverflow.dev/n/git-show-c-detects-a-copy-only-when-the-source-file-also-changed-in-that-commit-286084bc0763
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: git, diff, copy-detection

Copy the file and add a line to the copy, but leave the original alone: default and -C both show 'A copy.txt'. Change the original in the same commit as the copy, and -C reports 'C096 orig.txt copy.txt' alongside 'M orig.txt'. Without -C, git never reports copies. Tested with git 2.49.0.
