Php Storm issue with git

I am facing this weird issue with PHP storm, I tried this same thing with VS code and a few other software and I never faced this issue
So I open the project in PHP storm, and when I open a certain file, and then I cut any single line or comment it for testing purposes, when I hit CTRL+Z and undo the cut or edits, git will recognize the file as a changed file, it will be shown the file in "Changes not staged for commit", whereas I have not done any changes in the file, I just cut and undo it,
I am attaching a video representing the issue, I tried to modify 2 files and then undo the changes, but in git I can see those files are modified and when I will commit it, I will see those files in commits.
This is the major issue am facing with PHP storm, that's why am unable to use it totally
any help me, please

OS: Windows
PHP storm version: 2021.2
Video Link: https://drive.google.com/file/d/19UIL5Qey43Lf_WGUe20JN0rq-N4f6CnH/view

2 comments
Comment actions Permalink

Hi there,

"Settings/Preferences | Editor | General | Editor Tabs | Mark modified (*)"

Please enable the above option and try again. When a file is modified then the asterisk symbol will be displayed next to the file name in the editor tab, like on the screenshot below:

1) Do you see it on your system? If it gets displayed there and then gets removed shortly after that (or does not appear at all)... then you have something that triggers auto-save, e.g. a File Watcher that watches too much etc.

2) The IDE can auto-save modified files when you're leaving the IDE (switching focus to another app). Check Autosave section at "Settings/Preferences | Appearance & Behavior | System Settings",  in particular "Save files when switching to a different application or a built-in terminal" -- it should be ON by default.

This, of course, should not be happening when you do your edits and then Undo while the focus is still in the same file.

3) Might also be some plugin... but it's less likely. If you want to check this: disable ALL custom (not bundled by default) plugins, restart the IDE and try again. If it works OK now -- re-enable plugins 1 (max 2) at a time and see which one causes it.

2
Comment actions Permalink

Thank you so much, you are a lifesaver
there were some plugins which were causing this issue, I removed most of them, and now its working file
THANKS ALOT

0

Please sign in to leave a comment.