I am trying to pull master-dev into my branch. My branch has moved a file (git sees this as the file being deleted and a new file made), but the same file has been modified in master-dev.
I have moved it from 'a/myfile.py' to 'b/myfile.py'.
I want to get the changes from master-dev, but have the file in the new location.
There may have also been changes made after moving the file in my branch, if this is the case, I would like to see both sets of changes and then pick the best change.
I have checked out my branch, and then run git pull origin master-dev
. It reported merge conflicts, so I ran git mergetool
, which I have configured to use MELD.
I have resolved a few other conflicts, but it has now reached the file in question, and git mergetool
has prompted:
Deleted merge conflict for 'a/myfile.py':
{local}: deleted
{remote}: modified file
Use (m)odified or (d)eleted file, or (a)bort?
But unlike the other conflicts it has not opened meld, so I cannot see what the changes are in {remote}
i.e master-dev
. I also do not know if the file was changes as well as moved.
Can I tell git to delete this file, but then compare the changes between the {remote}
and the new file? Or is there another solution to this problem?
Is there a manual solution to this? What steps should I take to ensure that I do this cleanly without loosing any potential good changes from either branch?
Thanks.