• 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!
  • 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.

[Pokeemerald] About the basics of Git and starting a project with the Pokeemerald-expansion

I'm stuck at fixing the conflict in src/pokemon.c

When I open the file (I'm using Notepad++), I cannot find "HEAD" or the string of "===="s anywhere.

The text in my shell looks exact same as yours in the OP at this step (where it's showing the 4 conflicts etc.)

Any idea how I can find the code that needs to be deleted?
 
I'm stuck at fixing the conflict in src/pokemon.c

When I open the file (I'm using Notepad++), I cannot find "HEAD" or the string of "===="s anywhere.

The text in my shell looks exact same as yours in the OP at this step (where it's showing the 4 conflicts etc.)

Any idea how I can find the code that needs to be deleted?
Check the functions involved in that Merge Conflict, which are PokemonToBattleMon, and CopyPlayerPartyMonToBattleData right below it.
If they look like they do here on your end, then you should be good to go as far as that file is concerned.

I'll make sure to test everything again later today. I can't do it right now.
 
I updated the main post, rewriting the Merge Conflict in the src/data/pokemon/level_up_learnsets.h file, as the correct learnsets of the different Pokémon in the pokemon_expansion branch have been incorporated sometime ago. Something that I completely forgot about and UltimaSoul reminded me.
By default, all the moves introduced in Gen. 4 and above are commented out in order to let the branch work on its own if a user wanted to use it that way, so what a newcomer needs to do is simply remove the 2 Slash characters before the lines containing the LEVEL_UP_MOVE macro that do have them, saving and moving onto the next.
 
Hi,
Quick question regarding git and how it is working :
I linked my local repository, pokemeerald_egg, with my online account.
I saw on various online repositories, e.g egg or ghoulslash ones, that they have multiples branches related to a specific feature (e.g snow fix..)
The question is : When i want to add a specific feature, should i make a branch on my online repository, then git clone it locally and git pull from there ?
Or should i just git checkout name of the feature in my local repo and then git pull from there ?
The fact is that i dont understand how local branches are working ?
Thanks for your time and sorry for my bad english
 
If you want a specific branch form an online repository in your local repo you have to do the following:
git remote add NameYouChoose GithubLink
for example: git remote add ghoulslash https://github.com/ghoulslash/pokeemerald
and then you can pull the individual branches like:
git pull NameYouChoose BranchName
example: git pull ghoulslash snow_fix
 
The question is : When i want to add a specific feature, should i make a branch on my online repository, then git clone it locally and git pull from there ?
If this specific feature was posted by its creator in an isolated branch of its own, what you have to do is to add that person's repository via git remote, and then pull the branch where said feature is hosted by using git pull.
This is mentioned briefly in the main post's "Linking our project with its GitHub Repository" section.

For example, if I wanted to implement Ghoulslash's Bag Sorting feature, what I would do is:
git remote add ghoulslash https://github.com/ghoulslash/pokeemerald
git pull ghoulslash bag-sort
git remote lets you track Ghoul's repository, and git pull let's you incorporate any of the branches in said repository into your own.
To further clarify, what is going to be incorporated are all the commits present in the branch that you're pulling, that are not present in the current branch of your repository that you're working on.
 
Last edited:
Thanks to you two
I think i didnt explain correctly my problem :
I know how to pull and remote a specific feature from a online repository, thanks to this tutorial
What i dont understand is how should i organize my branches, e.g should i just pull everything in my local battle_engine_v2 branch and then push it on my online repo, or should i first create a local branch, then pull and then push it in a new online branch ?
 
Depends on what you are trying to do, branches are usefull for testing features but if you want all those features in one final project, you are going to have to merge them into one branch. I would probably push your working local repo online before pulling a new branch, then pull the new branch into your local battle_engine_v2 branch, fix merge conflict and test everything and only then make a new commit and push it online. That gives you the option of using "git reset --hard" if you made a mistake you cant fix.
 
Depends on what you are trying to do, branches are usefull for testing features but if you want all those features in one final project, you are going to have to merge them into one branch. I would probably push your working local repo online before pulling a new branch, then pull the new branch into your local battle_engine_v2 branch, fix merge conflict and test everything and only then make a new commit and push it online. That gives you the option of using "git reset --hard" if you made a mistake you cant fix.

Okay i think i get it, thanks for your time. I'll probably do what you're suggesting.

Also some time ago i pulled the quest-menu feature made by ghoulslash, but something went wrong and I had to revert my repo to a previous commit.
Now every time i try to pull it again git says that everything is up to date and doesnt want to merge it.
I told myself that the files were probably still there, but they're not, so i dont understand how i could add the feature again..
 
I'll be retouching this tutorial a little bit today, so expect to see some changes later today. The structure won't be much different, but I'll be expanding some of the steps.
Long story short, DizzyEgg's branches are now mantained by the ROM Hacking Hideout Organization, a group of ROM Hackers mostly composed of people like me who have been submitting Pull Requests aiding Egg with different aspects of his branches, be it to expand on functionality or correct bugs, fill in missing data, etc.
Naturally, this was all done with DizzyEgg's approval.

From the top of my head, the general procedure hasn't changed. The main difference is that the merge conflicts have changed a bit.
I want to take the chance and record a new video tutorial about merging the branches too, but I'll focus on that later.
 
Last edited:
Auto-merging src/wild_encounter.c
CONFLICT (content): Merge conflict in src/wild_encounter.c
Auto-merging src/pokemon.c
Auto-merging src/pokeball.c
Auto-merging src/party_menu.c
Auto-merging src/item_use.c
Auto-merging src/battle_script_commands.c
Auto-merging src/battle_main.c
Auto-merging src/battle_anim_throw.c
Auto-merging include/wild_encounter.h
Auto-merging include/pokemon.h
Auto-merging include/graphics.h
Auto-merging data/battle_scripts_2.s
Automatic merge failed; fix conflicts and then commit the result.


So I followed the tutorial, and when I try to git pull item expansion, this conflict shows up
Any ideas why?
 
Auto-merging src/wild_encounter.c
CONFLICT (content): Merge conflict in src/wild_encounter.c
Auto-merging src/pokemon.c
Auto-merging src/pokeball.c
Auto-merging src/party_menu.c
Auto-merging src/item_use.c
Auto-merging src/battle_script_commands.c
Auto-merging src/battle_main.c
Auto-merging src/battle_anim_throw.c
Auto-merging include/wild_encounter.h
Auto-merging include/pokemon.h
Auto-merging include/graphics.h
Auto-merging data/battle_scripts_2.s
Automatic merge failed; fix conflicts and then commit the result.


So I followed the tutorial, and when I try to git pull item expansion, this conflict shows up
Any ideas why?
There were changes done to that file in the item_expansion branch a few weeks ago. They may conflict with what you already had in it.
Check the merge conflicts you're getting for more details.
 
Back
Top