I have two branches in my project. Every branch contains Main.java in both.
- I do some changes in Main.java in the first branch(add some method or whatever).
- in the second branch, I move Main.java to another folder and do some another change inside a class(for example add some different method).
After that, I tried to merge first branch and a second branch. But git doesn't understand that it`s the same file and, as result, I have two files Main.java, but in different folders. One Main.java contains changes from the first branch and another Main.java contains changes from the second branch.
When I commit changes on a second branch (with a moved file to another folder), then git shows me that file Main.java with the old path will be removed and Main.java with the new path will be added. As I understand, its have to say something just like "modified", "moved"...
I just need, that file will be in folder from second branch and contains changes from both branches. Or, at least, git understand that it's same file and show me Conflict(content), not Conflict(modify/delete).
Have any ideas about this?