gitgit-rm

Cant rm folder with GIT rm?


I want to remove an entire directory with GIT ... each time I keep getting the same error and don't understand why this is happening.

I want to remove the "blue_white" folder ...

├── css
│   ├── design.css
│   └── red_white.css
├── images
│   ├── blue_white
│   │   ├── accordion-button.png
│   │   ├── accordion-shadow.png
│   │   ├── button1.png
│   │   ├── oem-slide-shadow.png
│   │   └── truncate-arrow.png
│   └── red_white
│       ├── accordion-shadow.png
└── pages.xml

When I do this ...

git rm -r blue_white/

I get this ...

fatal: pathspec 'f04/blue_white/' did not match any files

Solution

    1. $ rm -r images/blue_white/
    2. $ git rm -r images/blue_white/
    3. $ git commit -m 'Remove images/blue_white directory'