You seem to imagine that movement of a file is a "thing" in git, and that the branches you merge to are going to somehow magically "acquire" this movement as a feature, without anything else happening, or "folding" it into whatever else has happened. That is not true; that's not what git is. Git thinks in terms of individual files, and an individual file is a single path.
So file.txt is a file. If you move it to folder/file.txt, that's a different file. Git sees one file disappear and a new file appear. Git will try to connect these two files to one another if the situation is sufficiently simple, but there are no guarantees. And even if it does, it doesn't see this as a "move"; it sees it as a rename.
So I'm imagining that something like this happened:
on master:
file file.txt moved to [was renamed as] myfolder/file.txt
on branch:
file file.txt modified in place
So, that's a conflict. One branch renamed the file, the other branch modified the file. Git doesn't know what you want to do, so it leaves it up to you.
But you do not have a simple viable way forward either. You've done a Bad Thing. Which of those two things do you want, the rename or the modification? Neither! You want the contents of the file at file.txt in branch
, but you want them in the place where the "same" file is in master
, namely myfolder/file.txt. Yipes!
How are you going to fix this mess? The simplest way is to back out the merge and start over. You have two main choices:
Do your rearrangement work on the branch(es). In other words, call up everyone on the team and say, "Hey, everybody, in whatever branch you are working on, do a commit, move file.txt to myfolder/file.txt, and do another commit." If everyone does the same thing, it will all merge into master successfully.
Hold off entirely on the rearrangement. Call up everyone and say, "Hey everybody, when you get done with this branch, stop work until everybody has merged." Wait until everyone has merged, then do the rearrangement. Now everyone can pull master and work can start again with new branches.