I'm new to using git and was wondering how do I remove all cached .exe
files from a git repository (I want to keep them in my working folder). The root folder has subfolders that also have the .exe
files.
Will the following command work or do I have to do something else? I understand the -r is for removing directories and not files and it just seems wrong, and on searching about this topic, only relevant thing I found was using find
and delete
commands, but I'm not sure about how to use them.
git rm --cached -r *.exe
Edit: I ran the command and it only removed the .exe from root folder not the sub folders Is manually listing all sub folder paths and running that command the only option?
Since passing the git command with it's cached flag is required, for people who are unfamiliar with chaining commands in linux/ unix, the recursive remove unix answer is not sufficient.