Applying Patches to your repository

Started by poco_digo, March 09, 2013, 03:29:13 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

poco_digo

#1
Well first of all we need a tool that any developer should be have TortoiseGit, you can download from here, or RabbittVCS is an Linux alternative to TortoiseGit for Windows, both work very similarly. I think not necessary to explain how to clone a repo on your PC, it's out of this tutorial, moreover, is an operation that has little to explain.
Once we have our cloned repo, download the patches that we has applied, (I advise you use Gist of Github to post patches because it has the correct format for these files [*. Diff]) to download it just click in [Download Gist].


Unzip it and copy it into the root of the repository where you will apply the patches, then you put the mouse over the patch and follow the instructions that show in the image below.

The next picture appears, follow the instructions that show.

And if everything has gone right you will see this other image, since previously the owner of the patch should have verified that your application in the repo branch master doesn't report errors.

That's it. To see the changes produced, put the mouse over the repo name folder, then click right mouse button, and you scroll down the menu until TortoiseGit -> [Show log] and it will show the changes.
I see much distrust about what the patch can do, but it is easy to see that change been produced in the scripts, see the image below.

TortoiseGitmerge will open and show you the in right block the original script before, and on the left side the changes introduced.





Hey, don't like this mod, and the desired effect is not as I expected.
Ok, backward mobiola... three simple steps to fix it !

....oooO.................
.....(....)... Oooo.......
....\..(......(....).....
......\_)......)../.......
..............(_/........

....oooO.................
.....(....)... Oooo.......
....\..(......(....).....
......\_)......)../.......
..............(_/........

....oooO.................
.....(....)... Oooo.......
....\..(......(....).....
......\_)......)../.......
..............(_/........

This is the right way to implement patches to your project, quick, clean and reversible, that every one that does whatever, or as you come doing so until now, but it is not right way.
Best Regards