I want to use filter-branch to set all files to non-executable because most users use Windows. I ran the following command in Git Bash:
git filter-branch --index-filter 'for file in $(git ls-files)
do
git update-index --chmod=-x -- $file
done' -- HEAD~1..HEAD
However, I got an error message:
Rewrite bc4368aec16cce1c1faa7363dde9ac74ac28da6a (1/1)
error: .gitignore: does not exist and --remove not passed
fatal: Unable to process path .gitignore
error: LICENSE.md: does not exist and --remove not passed
fatal: Unable to process path LICENSE.md
error: README.md: does not exist and --remove not passed
fatal: Unable to process path README.md
Since I am on Windows, I cannot even use --tree-filter with chmod (at least this has not worked for me). When I use --filter-tree instead of --filter-index it works, but I am trying to use --filter-index because it is supposed to be much faster.