Instead of using a hardcoded list of ignores (.git, .DS_Store, etc), we should check if we are in a Git repo (e.g. using git rev-parse --is-inside-work-tree) and only walk non-ignored files (e.g. using git ls-files or by parsing the ignore-patterns ourselves).