4xy
4xy

Reputation: 3662

How to stop PyCharm show files in project in red color?

I would like to create project in PyCharm by open directory. I use https://github.com/metachris/tornado-boilerplate as a root of the project. I encountered that files are shown in red color in project window. It's really annoying thing.

I found this File Status Highlights. But I can't figure out how to get rid of the issue.

enter image description here

When I open empty directory and then create file just

$ touch file

It's color is red too.

Upvotes: 11

Views: 43138

Answers (7)

SpaceVixy
SpaceVixy

Reputation: 33

I wanted to add if this ever occurs in the middle of a project, after a change to something etc. if things were previously working properly and you think you probably have your vcs in order...

You can also right click the project file in the Project View and go down to 'Mark Project As..' and if instead of showing the options (Excluded being one of them), it only has a 'reverse/undo exclusion' option, then you can select that.

It's possible you did something that caused it to be excluded or accidentally clicked it etc. I've done that before uninstalling a package somehow, fat fingers maybe. A quick thing to check before trying more in-depth options.

Upvotes: 0

papulic
papulic

Reputation: 11

File -> Settings -> Version Control -> File Status Color -> Unknown

Upvotes: 1

Akshay Chandran
Akshay Chandran

Reputation: 1353

The files in Pycharm are under Version Control System (like git, cvs etc). To remove the 'red' color of the file you need to add that file to git repository (or any other VCS).

If you are using git,
Right click the file → git → commit file → select the file → commit
then, ctrl+shift+k to push it to the repository.

Upvotes: 1

Vaios Lk
Vaios Lk

Reputation: 51

Looks like the color is Brawn and the main reason for red color in files is that file exists locally, but is not in the repository, and is not scheduled for adding. So make sure that you check the files when you adding them in CVS. Works for me.

Upvotes: 1

Adam Funderburg
Adam Funderburg

Reputation: 406

Did you start you project within a directory that is under version control? The red color normally shows up when files are in a version controlled directory, but are untracked.

If this is the problem, you can solve it a few ways:

  1. Add all of the files to your vcs.
  2. Add the files to the ignore file of your vcs (.gitignore if you're using git)
  3. Move the project out of the repo under vcs.

Upvotes: 13

X.He
X.He

Reputation: 91

You can change the file color to whatever you want. File > Settings > Editor > Colors&Fonts > File Status > (Unkown > foreground).

The files in Pycharm are under Version Control. Pycharm changes the file's color by the status of file. The 'red' color of the file you mentioned indicated that the file is 'Unkown' status to the version control. If you add the 'Unkonwn' file to version control and commit to repository, the 'red' color can be changed.

Upvotes: 9

Andrey Vlasovskikh
Andrey Vlasovskikh

Reputation: 16838

Judging by the brown color of your files it looks like your project directory is under version control and that all the files in your project are not versioned. Check your File | Settings | Version Control settings and check the VCS status of these files in View | Tool Windows | Version Control | Local Changes.

Upvotes: 3

Related Questions