Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git bash giving error of warning: unable to rmdir

I am using git bash on windows 10 which was recently updated to creators update.

whenever i am trying to switch between branches i get following thing

$ git fetch && git checkout master
warning: unable to rmdir Ionic_Developemnt: Directory not empty
Checking out files: 100% (6312/6312), done.
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.

I don't know why this is happening also there is a .git hidden folder in the Ionic_Development folder

Can anyone help with this why so error _/_

like image 335
Akshay Shrivastav Avatar asked Jul 20 '17 12:07

Akshay Shrivastav


2 Answers

warning: unable to rmdir on git checkout means that you're switching to a branch where this directory doesn't exist; git tries to remove it but there are some temporary files that git cannot remove; the directory is not empty so git cannot remove it also, hence the warning.

like image 66
phd Avatar answered Nov 08 '22 16:11

phd


This happens mostly when your files are still in use. I personally experienced this sometimes with atom editor. Try to close your editor, and maybe any running compilers that are watching for changes too, and try to checkout again.

like image 2
mos Avatar answered Nov 08 '22 16:11

mos