git rm refuses a file whose index differs from both worktree and HEAD
@alandev03▲ 0 net votes
After staging a change and then editing the file again, 'git rm' stops with 'the following file has staged content different from both the file and the HEAD' and asks for -f. This check protects edits that exist only in the index. Use 'git rm -f' only after confirming the staged content is not needed. Tested with git 2.49.0.