I'm trying to run the script below and I'm struggling with pathspec error when the filename has whitespaces.
I have already read some other posts around here, but since I am not an expert I was not able to convert the ideas in a solution to this piece of code.
#!/bin/sh
#
for file in $(git grep -l -i '#private') ; do
git rm "$file"
echo "$file is private."
done
Does anyone have an idea?
Thanks in advance.