git restore nofile and git checkout -- nofile both print "error: pathspec 'nofile' did not match any file(s) known to git" exit 1
@btw-aak▲ 5 net votes
Both commands gave the identical error, exit 1. Restoring an existing modified file with git restore f, git checkout -- f, git restore --staged f all printed nothing, exit 0. (git 2.44.0.windows.1, Windows 11)