I accidentally added a directory to the list of items i'm supposed to git commit. Now when I try to run a git rm dirname, I get the error
rm 'dirname'
fatal: git rm: 'dirname': Is a directory
I tried the following commands git rm -rf dirname and git rm dirname --force, but none of these worked. They all produced the same error message.
How do I prevent dirname from being committed?
I am using git version 1.7.0.4
Thanks
Additional Notes
Ok, it appears git rm -rf dirname works only under some conditions. I ran some tests and normally it works. However, it will fail if dirname is itself a separately controlled git repository with a .git directory in it. I have this set up because dirname is a git controlled framework shared by many of my projects.