1. Find the patch that failed to be entered into the patch
You can find the failure information of the patch.
2. Reload the patch according to the index of the patch to merge the merged content. The conflicting parts are generated separately.
For example, if the index of the patch is 0023, you can find it in the. Git/rebase_apply directory. If the file in the case of a patch failure is arch/ARM/KVM/guest. C
Git apply. git/rebase_apply. git/rebase_apply/0023 -- reverse (after this operation, arch/ARM/KVM/guest is generated. c. rej file, which stores conflicting content)
3. use the editor to manually edit ARCH/ARM/KVM/guest. c. Set ARCH/ARM/KVM/guest. c. add the content in rej to arch/ARM/KVM/guest. C to resolve conflicts
4. Delete the generated conflict file
Rm ARCH/ARM/KVM/guest. C. rej
5. Add the modified file ARCH/ARM/KVM/guest. C to git so that it can be tracked by git.
Git add ARCH/ARM/KVM/guest. c
6. Continue to install the remaining patches.
Git am -- resolved
Git am patch_file_name