Pycharm файл горит красным
Files can be displayed in different colors in the Project tool window, and their editor tabs can be highlighted according to the results of code analysis , their version control state, and so on.
You can configure VCS file status colors on the Version Control | File Status Colors page of the IDE settings Ctrl+Alt+S .
To also highlight folders with modified contents, select Highlight directories that contain modified files in the Project tree on the Version Control | Confirmation page of the IDE settings Ctrl+Alt+S .
The table below lists default file status colors and their meanings in some of the color schemes.
The file in the active changelist is scheduled for addition to the repository.
Added in not active changelist
The file in an inactive changelist is scheduled for addition to the repository. This file status is available if the Highlight files from non-active changelists option is enabled in Settings/Preferences | Version Control | Changelists .
The file in an inactive changelist has been modified in the active changelist. In this case, a new dialog will open prompting you to resolve the changelist conflict. This file status is available if all options are enabled in Settings/Preferences | Version Control | Changelists .
If a file is a copy of another file, its metadata is tracked, and such a file is marked as copied .
The file is scheduled for deletion from the repository.
Deleted from file system
The file has been deleted locally, but hasn't been scheduled for deletion, and it still exists in the repository.
Have changed descendants
If a file is modified, the IDE will recursively highlight all directories containing that file. This status is available if the Highlight directories that contain modified files in the Project tree option is enabled in Settings/Preferences | Version Control | Confirmation .
Have immediate changed children
If a file is modified, the IDE will highlight its parent directory. This status is available if the Highlight directories that contain modified files in the Project tree option is enabled in Settings/Preferences | Version Control | Confirmation .
[Perforce, ClearCase, VSS] The file is modified without checkout.
A file is intentionally untracked by VCS.
The file is merged by your VCS as a result of an update.
Merged with conflicts
During the last update, the file has been merged with conflicts.
Merged with property conflicts
During the last update, the IDE has detected differences between the properties of the local file and its server version.
Merged with text and property conflicts
Text and property conflicts happen when two or more developers modify the same lines of a file and the same file properties.
The file has changed since the last synchronization.
Modified in not active changelist
The file in an inactive changelist has been modified. This file status is available if the Highlight files from non-active changelists option is enabled in Settings/Preferences | Version Control | Changelists .
The file should no longer be in your working copy of the repository.
Since the last update, the file has been renamed.
[SVN] The file is taken from a different branch than the whole project.
The file exists locally, but is not in the repository, and is not scheduled for addition.
None (default color)
The file hasn't been changed.
The file in the active changelist is scheduled for addition to the repository.
Added in not active changelist
The file in an inactive changelist is scheduled for addition to the repository. This file status is available if the Highlight files from non-active changelists option is enabled in Settings/Preferences | Version Control | Changelists .
The file in an inactive changelist has been modified in the active changelist. In this case, a new dialog will open prompting you to resolve the changelist conflict. This file status is available if all options are enabled in Settings/Preferences | Version Control | Changelists .
If a file is a copy of another file, its metadata is tracked, and such a file is marked as copied .
The file is scheduled for deletion from the repository.
Deleted from file system
The file has been deleted locally, but hasn't been scheduled for deletion, and it still exists in the repository.
Have changed descendants
If a file is modified, the IDE will recursively highlight all directories containing that file. This status is available if the Highlight directories that contain modified files in the Project tree option is enabled in Settings/Preferences | Version Control | Confirmation .
Have immediate changed children
If a file is modified, the IDE will highlight its parent directory. This status is available if the Highlight directories that contain modified files in the Project tree option is enabled in Settings/Preferences | Version Control | Confirmation .
None (default color)
[Perforce, ClearCase, VSS] The file is modified without checkout.
A file is intentionally untracked by VCS.
The file is merged by your VCS as a result of an update.
Merged with conflicts
During the last update, the file has been merged with conflicts.
Merged with property conflicts
During the last update, the IDE has detected differences between the properties of the local file and its server version.
Merged with text and property conflicts
Text and property conflicts happen when two or more developers modify the same lines of a file and the same file properties.
The file has changed since the last synchronization.
Modified in not active changelist
The file in an inactive changelist has been modified. This file status is available if the Highlight files from non-active changelists option is enabled in Settings/Preferences | Version Control | Changelists .
None (default color)
The file should no longer be in your working copy of the repository.
Since the last update, the file has been renamed.
None (default color)
[SVN] The file is taken from a different branch than the whole project.
The file exists locally, but is not in the repository, and is not scheduled for addition.
None (default color)
The file hasn't been changed.
The file in the active changelist is scheduled for addition to the repository.
Added in not active changelist
The file in an inactive changelist is scheduled for addition to the repository. This file status is available if the Highlight files from non-active changelists option is enabled in Settings/Preferences | Version Control | Changelists .
The file in an inactive changelist has been modified in the active changelist. In this case, a new dialog will open prompting you to resolve the changelist conflict. This file status is available if all options are enabled in Settings/Preferences | Version Control | Changelists .
If a file is a copy of another file, its metadata is tracked, and such a file is marked as copied .
The file is scheduled for deletion from the repository.
Deleted from file system
The file has been deleted locally, but hasn't been scheduled for deletion, and it still exists in the repository.
Have changed descendants
If a file is modified, the IDE will recursively highlight all directories containing that file. This status is available if the Highlight directories that contain modified files in the Project tree option is enabled in Settings/Preferences | Version Control | Confirmation .
Have immediate changed children
If a file is modified, the IDE will highlight its parent directory. This status is available if the Highlight directories that contain modified files in the Project tree option is enabled in Settings/Preferences | Version Control | Confirmation .
None (default color)
[Perforce, ClearCase, VSS] The file is modified without checkout.
A file is intentionally untracked by VCS.
The file is merged by your VCS as a result of an update.
Merged with conflicts
During the last update, the file has been merged with conflicts.
Merged with property conflicts
During the last update, the IDE has detected differences between the properties of the local file and its server version.
Merged with text and property conflicts
Text and property conflicts happen when two or more developers modify the same lines of a file and the same file properties.
The file has changed since the last synchronization.
Modified in not active changelist
The file in an inactive changelist has been modified. This file status is available if the Highlight files from non-active changelists option is enabled in Settings/Preferences | Version Control | Changelists .
None (default color)
The file should no longer be in your working copy of the repository.
Since the last update, the file has been renamed.
None (default color)
[SVN] The file is taken from a different branch than the whole project.
D1675A
The file exists locally, but is not in the repository, and is not scheduled for addition.
None (default color)
The file hasn't been changed.
7 Answers 7
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:
- Add all of the files to your vcs.
- Add the files to the ignore file of your vcs (.gitignore if you're using git)
- Move the project out of the repo under vcs.
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.
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.
In "File>Settings>Version Control" I found nothing regarding file colorizing or similar topic. I only found "Changelist Conflicts", but it seems it doesn't regards the issue. Menu item "View>Tool Windows>Version Control" is disabled.
I found "File>Settings>File Colors" tab, but the settings availabe on this page also do not matter for me.
@4xy I meant that you could either disable version control for your project or commit these files to the repository. These files are shown in brown in order to draw your attention to the fact that you're probably not done with them yet and some action is still required.
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.
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.
File -> Settings -> Version Control -> File Status Color -> Unknown
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.
Когда я открываю пустой каталог, а затем создаю файл, просто
Его цвет тоже красный.
Вы начали свой проект в каталоге, который находится под контролем версий? Красный цвет обычно появляется, когда файлы находятся в каталоге с контролируемой версией, но не отслеживаются.
Если это проблема, вы можете решить ее несколькими способами:
- Добавьте все файлы в свой vcs.
- Добавьте файлы в файл игнорирования вашего vcs (.gitignore, если вы используете git)
- Перенести проект из репо в vcs.
Файл -> Настройки -> Контроль версий -> Цвет состояния файла -> Неизвестно
Файлы в Pycharm находятся в системе контроля версий (например, git, cvs и т. Д.). Чтобы удалить «красный» цвет файла, вам нужно добавить этот файл в репозиторий git (или любой другой VCS).
Похоже, это цвет Brawn, и основная причина красного цвета в файлах заключается в том, что файл существует локально, но не находится в репозитории и не запланирован для добавления. Поэтому убедитесь, что вы проверяете файлы, когда добавляете их в CVS. Работает для меня.
Судя по коричневому цвету ваших файлов, похоже, что каталог вашего проекта находится под контролем версий и что все файлы в вашем проекте не версируются. Проверьте свой файл | Настройки | Настройки контроля версий и проверьте статус VCS этих файлов в View | Инструментальные окна | Контроль версий | Локальные изменения.
Вы можете изменить цвет файла на любой, какой захотите. Файл> Настройки> Редактор> Цвета и шрифты> Статус файла> (Неизвестно> передний план).
Файлы в Pycharm находятся под контролем версий. Pycharm изменяет цвет файла в зависимости от статуса файла. Красный цвет упомянутого вами файла указывает на то, что файл имеет статус «Неизвестный» для системы контроля версий. Если вы добавите файл «Unkonwn» в систему контроля версий и зафиксируете его в репозитории, «красный» цвет можно будет изменить.
Я нашел это " Основные сведения о статусе файла" . Но я не могу понять, как избавиться от проблемы.
Когда я открываю пустой каталог, а затем создаю файл, просто
Его цвет тоже красный.
Вы начали свой проект в каталоге, который находится под контролем версий? Красный цвет обычно появляется, когда файлы находятся в каталоге с контролируемой версией, но не отслеживаются.
Если это проблема, вы можете решить ее несколькими способами:
- Добавьте все файлы в свой vcs.
- Добавьте файлы в файл игнорирования вашего vcs (.gitignore, если вы используете git)
- Перенести проект из репо в vcs.
Вы можете изменить цвет файла на любой, какой захотите. Файл> Настройки> Редактор> Цвета и шрифты> Статус файла> (Неизвестно> передний план).
Файлы в Pycharm находятся под контролем версий. Pycharm изменяет цвет файла в зависимости от статуса файла. Красный цвет упомянутого файла указывает на то, что файл имеет статус «Неизвестный» для системы контроля версий. Если вы добавите файл «Unkonwn» в систему контроля версий и зафиксируете его в репозитории, «красный» цвет можно будет изменить.
Судя по коричневому цвету ваших файлов, похоже, что каталог вашего проекта находится под контролем версий и что все файлы в вашем проекте не версируются. Проверьте свой файл | Настройки | Настройки управления версиями и проверьте статус VCS этих файлов в View | Инструментальные окна | Контроль версий | Локальные изменения.
В «Файл»> «Настройки»> «Контроль версий» я ничего не нашел относительно раскрашивания файлов или подобной темы. Я нашел только «Конфликты Changelist», но, похоже, это не касается проблемы. Пункт меню «Вид> Окна инструментов> Контроль версий» отключен.
Я нашел вкладку «Файл> Настройки> Цвета файла», но настройки, доступные на этой странице, также не имеют для меня значения.
@ 4xy Я имел в виду, что вы можете либо отключить контроль версий для своего проекта, либо зафиксировать эти файлы в репозитории. Эти файлы показаны коричневым цветом, чтобы привлечь ваше внимание к тому факту, что вы, вероятно, еще не закончили с ними и все еще требуются некоторые действия.
Local Colors
In this area, configure the color-scope associations to be applied locally.
Once defined, a color-scope association cannot be changed. To re-assign a color to a scope, remove the existing association and define a new one.
This read-only field shows the scope to apply the color setting to.
This read-only field shows the color to be applied to the corresponding scope.
Click this button to open the Add Color Label dialog in which you can configure a new color-scope association.
Click this button to remove the selected color-scope association.
Move up or Move down
Use these buttons to sort the color-scope associations and thus determine the order in which they are applied.
Click this button to have the selected scope-color association shared among the members of the team.
The selected association will be accordingly moved to the list in the Shared Colors area.
Shared Colors
Use the controls in this area to configure the color-scope associations to be shared among all the members of the team. File colors are stored as project settings in .idea/fileColors.xml .
Once defined, a color-scope association cannot be changed. To re-assign a color to a scope, remove the existing association and define a new one.
This read-only field shows the scope to apply the color setting to.
This read-only field shows the color to be applied to the corresponding scope.
Click this button to open the Add Color Label dialog in which you can configure a new color-scope association.
Click this button to remove the selected color-scope association.
Move up or Move down
Use these buttons to sort the color-scope associations and thus determine the order in which they are applied.
Click this button to have the selected scope-color association applied only locally.
The selected association will be accordingly moved to the list in the Local Colors area.
I found this File Status Highlights. But I can't figure out how to get rid of the issue.
When I open empty directory and then create file just
It's color is red too.
Line status in the editor
If VCS integration is enabled for the current project, modified lines in a file are marked with different colors in the gutter.
You can configure the line status colors on the Editor | Color Scheme | VCS page of the IDE settings Ctrl+Alt+S .
To disable highlighting of the modified lines, clear the Highlight modified lines in gutter checkbox on the Version Control | Confirmation page of the IDE settings Ctrl+Alt+S .
The table below lists default line highlighting colors and their meanings in some of the color schemes.
Lines that have been modified since the last update.
Lines in which only whitespaces have been modified since the last update.
Lines that have been added since the last update.
Lines that have been removed since the last update.
Lines that have been modified since the last update.
Lines in which only whitespaces have been modified since the last update.
Lines that have been added since the last update.
Lines that have been removed since the last update.
Lines that have been modified since the last update.
Lines in which only whitespaces have been modified since the last update.
Use this page to set different background colors for distinguishing between project files of specific scopes.
For more information on how to work with the feature, refer to Scopes and file colors.
Enable file colors
Select this checkbox to enable the feature.
Use in editor tabs
Enable colors in editor tabs.
Use in project View
Enable colors in the Project tool window and in search results (for example, in the Find in Files dialog Ctrl+Shift+F ).
Click this button to define the required scopes.
Читайте также: