I currently have two branches I am working on. Because of a software update I had to completly change the folder structre. Therefore I moves the files in both branches. Now I reached a point where I want to merge my working branch into my master branch.
The problem is that there are merge conflicts that tell me that a file was added by only one branch (added by them
or added by us
). The problem is that the file has been added by both branches.
For example I have a texture at textures/texture1.png
. The master branch just moved it to the right location (was before misc/textures/texture1.png
). The working branch moved it to the exact same location and edited it afterwards. The merge conflict for this file says:
added by us: textures/texture1.png
The point is that this is not the file I want! I want the file from the other branch!
When I do
git checkout --theirs textures/texture1.png
I get
error: path 'textures/texture1.png' does not have their veresion
But this file does exist! I added it recently! And that's the file I want
How do I resolve these conflicts?
(more information if needed!)
Often, merge conflicts happen when people make different changes to the same line of the same file, or when one person edits a file and another person deletes the same file. You must resolve all merge conflicts before you can merge a pull request on GitHub.
You can always try
git mergetool
this will open a GUI, where you can choose your desired changes by just clicking the appropriate links. Sometimes you need to do manual changes. But in your case you just have to select a file image.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With