Personally I stumbled on a similar error message in this scenario:
I created a folder that has been empty, so naturally as long as it is empty, typing git add *
will not take this empty folder in consideration. So when I tried to run git rm -r *
or simply git rm my_empty_folder/ -r,
I got that error message.
The solution is to simply remove it without git: rm -r my_empty_folder/
or create a data file within this folder and then add it (git add my_no_long_empty_folder
)