On branch checkout some files from current branch that do not belong to target branch stay (and marked unstaged)
Situation that became quite often after recent WebStorm update:
I am on `master` branch, which contains some files that are not on `dev` branch.
I checkout `dev` branch and some files from `master` that do not belong to `dev` stay in the tree and marked as not staged. However, other "disappear" as expected. I noticed that files created via IDE have normal behaviour while those added via OS (i.e. copied from some other location) tend to 'freeze' across branches.
Similar issue is described here: https://intellij-support.jetbrains.com/hc/en-us/community/posts/206066739-files-show-up-from-other-branch (dtd May 2013, not resolved).
When trying to checkout back to `master` IDE reports "Checkout failed" offering to remove untracked files before checking out. Sometimes this helps, other times throws an IOException.
However IDE behaves as expected in rare cases, which frustrates even more since should unproper behaviour be consistent I would look somewhere else.
I have switched off Workspace management feature. That haven't helped.
What is total nightmare, it seems that sometimes files do not get updated from git tree, which causes merger conflicts... Will try to reproduce and track this. Before today I thought something wrong happened to my git skills....
Anyone facing similar issue? Any suggestions will be appreciated.

My environment:
WebStorm 2017.3
Build #WS-173.3727.108, built on November 25, 2017
JRE: 1.8.0_152-release-1024-b6 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 8.1 6.3
Situation is totally similar on my other computer under Windows 10.
Please sign in to leave a comment.
If you could reproduce this with some consistency, please submit an issue to https://youtrack.jetbrains.com/issues/IDEA
The description is not clear, however. IDE calls external git process to do checkouts, and e.g. the error on the screenshot is returned by git, not IDE. When the issue happens (e.g. as you say files are not updated in the tree), what does git status say on the command line?
Dmitriy, thank you for your comment.
That gave me an idea. In short, it is not IDE's fault. My apologies for the wrongful accusations.
How to reproduce in a project under git control:
Outcome:
It seems like the plugin causes IDE to lock the file and doesn't release it on checkout.
Should rather report the issue to the plugin author.
Native Jetbrains Markdown support plugin causes no issues as it shows only initial .gif frame, and therefore the file isn't locked.