Some times you need to merge some specific commits into your branch
so here is what I usually do when I need this.
- creating a file that has all the info about this hash (patch)
git format-patch -1 <commit_hash> - check the changes applying
git apply --check <changes.patch>If the result of git apply returns nothing then you can apply it.
- apply the commit
git am -s <changes.patch>But If there are errors, then you have to apply it using 3-way merge So instead of doing the previous step you need to do the following
git am -3 <changes.patch> - Check the log conflicts or search for it.
- fix the conflicts and add them
git add <changed_fix_conflict_files> - continue the applying patch
git am --continue