We could also use "git ls-tree -r HEAD --name-only FILENAME" and check if the output us empty.