Delete git git bash directory, windows

xx@xx-PC ~/xampp/htdocs/sites $ rmdir /s "yo-2" rmdir: `/s': No such file or directory rmdir: `yo-2': Directory not empty xx@xx-PC ~/xampp/htdocs/sites $ rmdir "yo-2" rmdir: `yo-2': Directory not empty 

I cannot get rmdir to work in git bash. This is not in the git repository, and I tried above. Mcdir works as expected, why is it not?

+6
source share
4 answers

rmdir will not work if the directory is empty

Try

  rm -rf yo-2 

git-bash is a linux shell

+15
source

If you are trying to delete the whole directory regardless of the contents, you can use:

 rm <dirname> -rf 
+3
source

After polling a few other commands, this worked for me:

 rm dirname -rf 
0
source

Late answer, but for those seeking a solution, for me

 rm <dirname> -rf 

it wasn’t good, I always get the directory non-empty or too long in node directories.

A really simple solution: Move the directory you want to delete to the root of your disk (to shorten your path), and then you can delete it normally.

-1
source

All Articles