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

前端 未结 3 879
长发绾君心
长发绾君心 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条回答
  •  猫巷女王i
    2020-12-11 18:57

    If using the -f flag doesn't make any difference (i.e. the file still doesn't get staged), double check that the thing you're trying to add isn't already in the repository.

    In my case I was trying to add something that had already been added and then deleted on a different branch, leading me to incorrectly think it had never been added in the first place. And Git was quite reasonably refusing to add the same thing twice.

提交回复
热议问题