Jump to content

How to merge own customisation with trunk


Recommended Posts

Posted

Hi,

I've made very minor modification to player.cpp to allow proper mana regeneration after level 70. The problem is now when I do git pull I received an error message saying that merge fail and I need to update. I thought git pull is the update that I'm doing.

How do I resolve this issue?

Thanks..

Posted
Hi,

I've made very minor modification to player.cpp to allow proper mana regeneration after level 70. The problem is now when I do git pull I received an error message saying that merge fail and I need to update. I thought git pull is the update that I'm doing.

How do I resolve this issue?

Thanks..

git commit -a -m "my minor changes"

Posted
git commit -a -m "my minor changes"

Thanks for the very fast response freghar.. if I do commit, wouldn't I be updating the main mangos repository?, is that ok? "my minor changes" = just a comment text?

Posted
Thanks for the very fast response freghar.. if I do commit, wouldn't I be updating the main mangos repository?, is that ok? "my minor changes" = just a comment text?

You dont commit changes to the mangos repo but only into your own local repo. GIT was downloading and setting up the whole mangos repo onto your own harddrive as you used "git clone"

bye

HiTmAn

Posted
You dont commit changes to the mangos repo but only into your own local repo. GIT was downloading and setting up the whole mangos repo onto your own harddrive as you used "git clone"

bye

HiTmAn

Thanks Hitman, I'll give it a try now..

Posted

Another way you can do the same:

- "git stash" removes all your uncommitted changes and saves them for later

- update to new sources

- "git stash apply" restores all your uncommitted changes

Posted
Another way you can do the same:

-"git stash" removes all your uncommitted changes and saves them for later

- update to new sources

- "git stash apply" restores all your uncommitted changes

nice! could you add this to one of the stickied tutorials? yesterday i had really trubles with updating my branch. after some filedeletes and copies and updates i finally recived to update it, but your solution seems to be easier :D

  • 2 weeks later...
Posted
Another way you can do the same:

- "git stash" removes all your uncommitted changes and saves them for later

- update to new sources

- "git stash apply" restores all your uncommitted changes

it seems good..but i've some questions:

- git stash -> ok, no problem ^^

- update ( could you remember me how? :mellow: plz )

- git stash apply -> ok...but i would know: when i update to new source, the code will change and my customisation could generate some conflicts... is it right?

Posted
- git stash apply -> ok...but i would know: when i update to new source, the code will change and my customisation could generate some conflicts... is it right?
Yes .. from the git manual, "This operation can fail with conflicts; you need to resolve them by hand in the working tree.". So maybe it's better if you just learn to commit your local changes and then you can use mergetools to resolve the conflicts.
Posted
So maybe it's better if you just learn to commit your local changes and then you can use mergetools to resolve the conflicts.

i think that , _for me_ , it's better that i don't commit my changes in a _new local revision_ 'coz i need to extract them in a patch when i want ... is there a way to do it committing my customisations in the local changes too? ( using a comparison from my local revision and origin rev? )

sry my English

Posted
i think that , _for me_ , it's better that i don't commit my changes in a _new local revision_ 'coz i need to extract them in a patch when i want ... is there a way to do it committing my customisations in the local changes too?

sry my English

1. all your commits are local and don't affect what other people see until you push those changes to some remote repo

2. you can "extract them in a patch" by just doing

git diff origin/master > file.patch

3. if you apply or write multiple patches you can commit each one in a separate commit and you can extract a patch for just those changes anytime.

4. you can revert individual patches with git revert

Posted

1. all your commits are local and don't affect what other people see until you push those changes to some remote repo

i know it ^_^

2. you can "extract them in a patch" by just doing git diff origin/master > file.patch

it is _WHAT I WANT_! great power of git :)

3. if you apply or writte multiple patches you can commit each one in a separate commit and you can extract a patch for just those changes anytime.

mhm...it seems to be nice..

4. you can revert individual patches with git revert

ok , very well ;)

tnx for your _VERY FAST_ reply Wyk3d :lol: .. i think that this topic should be pinned for guys that want know how to work with own costumisation.

EDIT: i hated git,but now i think that will be my best friend.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use