轉載來自:https://blog.csdn.net/qq_34602140/article/details/85060720
使用git時,如果想把一個項目的修改添加到另一個項目中時,可以使用git format-patch命令,把補丁包放到一個目錄下面,在項目中使用git am命令即可。在使用git am時有時會報patch does not apply
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".
這些錯誤,說明當前patch有沖突,不能合並,此時使用git apply --reject patch文件,強制把不沖突的文件先合並,有沖突的會生成.rej文件 ,在根據這個文件中的修改去手動執行即可 ,解決完沖突要把.rej文件刪除,在執行git add . ==> git am --continue命令即可。