• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Script] Is it possible to join two different pokeemerald repositories?

I want to create a rom with all the funcionality from pokeemerald expansion (https://github.com/rh-hideout/pokeemerald-expansion) and this other repository and tree, which includes functionality for randomization and nuzlockes (https://github.com/TheXaman/pokeemerald/tree/tx_randomizer_and_challenges)
Is there a way to achieve this, or have anything similar been done already?
Yes, of course it's possible.
You have to track TheXaman's repository using git remote and then pull this tx_randomizer_and_challenges branch by using git pull.
For more information, see: https://www.pokecommunity.com/threads/432321
 
Yes, of course it's possible.
You have to track TheXaman's repository using git remote and then pull this tx_randomizer_and_challenges branch by using git pull.
For more information, see: https://www.pokecommunity.com/threads/432321

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? 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? What command do I use to decide this? 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)
 
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.
 
Back
Top