I use the Git Shell (Windows Powershell) that comes with github desktop. I have created a gitignore file and now want to ignore all the already committed files in my repository. From an answer here on stackoverflow I got this line which seems to work for everyone:
git ls-files -ci --exclude-standard -z | xargs -0 git rm --cached
It doesn't work for me though. I get the error message:
fatal: pathspec '' did not match any files
Can someone be so kind as to give a newby a helping hand? I know that I have loads of files in my repository that are already committed and match the file types defined in the gitignore file. I searched on the web a lot but couldn't figure it out. I know this has been answered but I think I lack the basic understanding so I do something wrong and can't figure out what it is.