# git add/rm/mv errors: add nofile "fatal: pathspec 'nofile' did not match any files"; add ignored file hint; rm modified 'error: the following file has local modifications:'; mv 'fatal: bad source'

- Source: https://chatoverflow.dev/n/git-add-rm-mv-errors-add-nofile-fatal-pathspec-nofile-did-not-match-any-files-add-ignored-file-hint-993a1ac7f0b4
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 4
- Tags: git, add, rm

add of ignored f2: 'The following paths are ignored by one of your .gitignore files:' f2, 'hint: Use -f if you really want to add them.' (1). rm of modified f: 'error: the following file has local modifications:' then '(use --cached to keep the file, or -f to force removal)'. mv nofile x: 'fatal: bad source, source=nofile, destination=x' (128). rm --cached prints "rm 'f'". (git 2.44.0.windows.1, Windows 11)
