Jump to content

Merge upto a specific revision ?


Recommended Posts

Posted

Hey,

MaNGOS has just switched to 3.2.2a however I prefer to say at 3.1.3 for a while till I have the time to properly do the upgrade.

I use a custom branch with my source edits in git and use the following commands to update it to the latest mangos

git pull
git merge origin/master

so it just pulls all updates for all branches and then I merge the master branch into my custom branch.

However how can I merge upto a specific branch (or a tag) so I can keep my server at the last 3.1.3 revision ?

Thank you for your time, Xeross

Posted

i suggest to create a "clean" mangos branch (at same rev of you custom one), and the branch patched with your custom.

do a .patch with "git diff master..custom > changes.patch" and youll get all your custom changes in a single patch file. now switch to master branch and uptdate, delete custom and make a copy of master ("git branch -f custom") and apply patch ("patch -p1 < changes.patch"). after that check for errors and you can compile.

Fell free to comment :)

Posted

Hmm I still have patches of my changes but I'd have to make new ones for newer revisions, merges can look over any changes and apply correctly but patch files don't seem to merge as well as a git merge.

Posted

once i did something like:

mkdir mangos; cd mangos #create an empty mangos dir, change to it

git init

git add .

got commit -m 'initial commit'

git remote add mangos <git_repository_here>

git fetch mangos

git merge <revision_hash_here>

Posted

I solved it by resetting one branch to the revision I wanted and mergin that into the current branch. I'm getting quite proficient with git now, merged around 7 branches into 1 right now so pretty cool. am also converting all my SVN repos to GIT.

×
×
  • 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