Sorry for asking this, I don't know much about git. But this a sample of the message I got when trying to use git pull:
Code:
Auto-merging src/battle_controller_recorded_player.c
Auto-merging src/battle_controller_player_partner.c
Auto-merging src/battle_controller_player.c
CONFLICT (content): Merge conflict in src/battle_controller_player.c
Auto-merging src/battle_ai_switch_items.c
CONFLICT (content): Merge conflict in src/battle_ai_switch_items.c
CONFLICT (modify/delete): src/battle_ai_script_commands.c deleted in HEAD and modified in d139b54d3b487c4c4ec36ae6c8d6a0c6eee96789. Version d139b54d3b487c4c4ec36ae6c8d6a0c6eee96789 of src/battle_ai_script_commands.c left in tree.
Auto-merging ld_script.txt
How do I resolve these conflicts?
Gah, I forgot to explain merge conflicts when I rewrote the tutorial I linked above...
It should still be in the archived version linked at the end of the thread though.
Basically, when you pull a feature branch that modifies a part of the decomps' code that was already modified by someone else previously, a merge conflict arises.
To solve a merge conflict, you need to decide which piece of code to keep; the piece of code that was in that spot before the merge, the piece of code that came from the merge, or sometimes, a mix of both.
Git adds lines of its own to mark the area where a merge conflict is located inside the file.
Normally, it's:
-
<<<<<<<< HEAD
to represent the old code.
-
>>>>>>>> commit_hash
to represent the new code.
-
========
in the middle to separate both.
You either need to delete:
-Everything from
<<<<<<<< HEAD
to
========
to keep the new code.
-Everything from
>>>>>>>> commit_hash
to
========
to keep the old code.
Or well, you just have to mix the 2 pieces of code.
Once you're done, you have to delete these special line added by Git too.
Do I have to decide which version of the .c files to keep? Either the one from pokeemerald-expansion or the one from the branch I'm trying to pull?
You don't need to decide between the files, but between pieces of code. The pieces directly involved in the merge itself.
What command do I use to decide this?
None. It's pure text editing.
Could I also just combine the files by deciding where to put the conflicting lines of code? (So I can keep all the functionallity from both repositories)
There may be a handy extension to do that in Visual Studio Code for example, but I couldn't tell you since I don't use that program myself.