Jump to content

Git patching, does it revert to the rev in the patch.


Recommended Posts

Posted

Maybe I don't exactly understand yout question, but - a patch file is a set of changes, not files. In most cases, those changes are small and say "remove this line and replace it with those three", nothing less, nothing more.

But yes, it is possible to create large patch files which are able to "revert" the whole mangos tree to some state from some other.

Posted

You indeed don't get my question.

Ok i've made my own patch file with the changes i want in mangos, however whenever i do a git pull origin master when the patch is applied i get File X needs update for all the files the patch changes instead of merging them so i was wondering if the patch takes an older version of the file and patches that instead of patching the newest version.

Posted
You indeed don't get my question.

Ok i've made my own patch file with the changes i want in mangos, however whenever i do a git pull origin master when the patch is applied i get File X needs update for all the files the patch changes instead of merging them so i was wondering if the patch takes an older version of the file and patches that instead of patching the newest version.

"file X needs update" means you should remove uncommited changes (commit, stash, ...) before merge (pull is basically fetch+merge). And yes, I think it keeps the old version of all files if merge fails this way.

Posted
hmm so if i do git commit it will update normally ?

It will do a recursive merge of your branch and the remote branch. If you want fast-forward update, you should do a git-stash and unstash (apply) your changes after update.

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