I have 2 branches A and B both locally and remotely. I made some work on branch A, pushed to the remote repository. Still on my branch A locally, I realized that some files where no more needed, so I deleted them locally, made a commit and pushed again the changes remotely.
Now I switch locally to branch B where I've been doing some work. I realized that the files that I previously deleted (on branch A) are necessary, so I re-created the files (on branch B), did everything that I previously did and then commit the changes.
Like I said previously, some work has been done on branch A that I committed and pushed, and I am currently working on branch B where I just made a commit of my changes.
Here arises the problem: I want to merge the changes done on branch A into branch B. I start the merging, some files have conflicts, I fix the conflicts shown but then the files that were deleted on branch A that I re-created on branch B are now missing.
I'm using android-studio, so I tried the merge using the VCS tool embedded in A.S it didn't work; I tried merging from my terminal the result's the same.
What can be the cause of this?