I have created two branches for a project I'm working on with git in IntelliJ. The first branch (A) I was working on modifying a file (call it A.Java). When I switched to second branch (B) with IntelliJ checkout, after modifying A.java under branch A, the file resulted to have the same modification in B that I was doing only under A!
This policy doesn't seems normal to me, since when I'm working in A I don't want to affect other branches. Where is the problem? Is a git behavior or it is only in IntelliJ?