I'm trying to delete files within a folder in git using git bash and its not working properly.
I want to delete all files within a folder without deleting the folder itself and doing all of this from outside of the folder.
I'm trying to delete files within a folder in git using git bash and its not working properly.
I want to delete all files within a folder without deleting the folder itself and doing all of this from outside of the folder.
Git Bash uses UNIX commands. To delete all the files within a directory from outside the directory (say it is named dirName) use:
rm -f dirName/*
The -f option forces deletion, so that your shell will not request confirmation for every file you want to delete. See the rm man page for more info on rm options and such.