Nikita
Nikita

Reputation: 639

Why would IntelliJ IDEA not be able to index files for a GitHub commit?

The title pretty much says it all, but to make things worse, new files aren't tracked as well. I figured that this is likely a rare exception, but it would be good to know what is causing the issue - in case a large project gets bugged by it. This question might help anyone who gets in this mess, so please post your suggestions.

Here is a screenshot of the situation: https://i.sstatic.net/iMn3O.png


Here is the screenshot I posted of the Settings... > Version Control > Ignored Files page: https://i.sstatic.net/9F0sq.png It shows what is wrong on the 3rd line.

If you still can't index:
It might be because after removing the ignoring of your files, that the VCS hasn't been brought up to speed of the fact. Go to VCS > Show Changes View and then hit CTRL+F5 or click the Refresh Icon. Now you have Unversioned Files and you're ready to add files to the index.

I have solved the issue with a roundabout way. What I did was: I didn't include the .classpath file that Eclipse creates. IntellIJ asked if I wanted to open .project, I canceled that and just opened the project regularly, that solved it for me. It might have quietly induced the ignore entry from the screenshot.

Upvotes: 1

Views: 670

Answers (1)

yole
yole

Reputation: 97148

The file is ignored. You have added your entire project directory to "Ignored files" in Settings | Version Control | Ignored Files, which leads to IntelliJ IDEA not showing any files as unversioned, and not allowing you to add them to Git.

You need to remove the project directory from the Ignored Files list.

Upvotes: 3

Related Questions