I'm using WebStorm with Typescript but I would assume this could apply to other editors and languages as well.
Is there a way to index files that changed after switching branches (git checkout to a different branch)? Each time after I checkout a different branch, after opening a file, I get various errors in the editor (typescript errors, various import path errors, missing imports, wrong types for function parameters etc). Of course, these errors would apply to the old branch, not the checked out one.
I currently fix this if I navigate to the offending file and open it, then WebStorm figures out that nothing's actually wrong.
My assumption is that no indexing is done on the new files so WebStorm keeps the old branch info, so the resulting behaviour is normal.
Is there a way to force indexing for the files that changed after making such a branch checkout?