There are many ways of doing this. However maybe you have a favorite merge tool? For me this was open-diff which can show my old version to the left, the new version which I got from someone to the right and the current merge of them at the bottom. I can also edit the bottom one and write whatever I want there. In other words an awesome tool for doing manual merging and adopting of some but not all changes which have been sent to you. It took me a while (and some help from #git on freenode) to figure out how to use open diff for this but in the end it was well worth it.
This is how you can do it:
1. Create a new branch and apply the patch. Copy the #hash it get.
2. Checkout the branch you want to apply the merged commit to.
3. Write:
git diff-tool -t opendiff #hash
This will open the opendiff tool for your original compared to the new version and when saving you can overwrite you original files and commit as usual.
No comments:
Post a Comment