Git is ignoring .idea folder, but that isn't in gitignore

前端 未结 3 880
长发绾君心
长发绾君心 2020-12-11 17:58

The problem:

I\'m on OSX. I have a very small .gitignore file, and I even tried completely deleting the file. Nothing helps. Git doesn\'t see anything under my .id

3条回答
  •  一个人的身影
    2020-12-11 18:55

    I had the same problem. In my .git/exclude/info file, I exclude the names of executables that are created. But I often use the same name for the directories in which these executables reside, e.g. the "sphere" directory contains the executable "sphere". Since I had added all of the files before excluding the executable names in info/exclude, the fatal error never kicked in, even after excluding the directory/executable name to info/exclude.

    Recently, however, I tried to add a file from a directory whose name was already excluded (because it matched the name of an executable I was excluding). The fatal error kicked in, and I was confused. I forced the add, and now any subsequent adds ignore the fatal error.

    What this suggests is that it makes sense to exclude executable names in local .gitignore files, rather than in info/exclude.

提交回复
热议问题