Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why are my classes marked in red in IntelliJ IDEA

I have some Java classes which are marked in red in project view, but IntelliJ IDEA shows no errors and it can run properly. What can be the problem?

screenshot

like image 903
nabayram Avatar asked Sep 12 '25 16:09

nabayram


1 Answers

It means that the files exist locally, but are not in the repository, and are not scheduled for addition. With other words, the files are not under version control. There is not really a problem since the files can just be added to the VCS if desired. This can be done using Add to VCS from the context menu or the shortcut ⌥⌘A (Mac) or Ctrl+Alt+A (Windows).

See File Status Highlights in the official documentation of IntelliJ IDEA for other colours and their respective meaning. See Manage files under version control for how to put the files under version control.

like image 187
Matt Avatar answered Sep 15 '25 07:09

Matt