So the problem here is I have my code in some-git repository build with maven with branches master and myBranch. The present master structure is : 
Project_
        |
        Core
        Driver
        Tests _ XTest
             |_ YTest
And recently I have made changes onto myBranch refactoring modules and directories.
Project_
        |
        Core[core]
        Driver[driver]
        XTests[x-test]  // format []
        YTests[y-test]
Using intelliJ and currently on myBranch as I checkout master the entire structure is restored but the directories XTests and YTests would not be removed. Any ideas onto why this is happening and what's the solution to get this corrected so that the directories are no more there?
Note : Not the entire directory remains but just the resources from XTests and YTests under /src/main/resources are still there in the project.
 
    