打patch(补丁),尤其是使用git format-patch生成的patch,可以非常简单:
$ git am PATCH
不过,说它简单,这仅限于如果这些patch能够完美的被集成进你的代码库。一旦产生任何代码冲突,使用git
am就会变得有些复杂。
比如,一个典型的git am失败,可能是这样的:
$ git am PATCH
Applying: PACTH DESCRIPTION
error: patch failed: file.c:137
error: file.c: patch does not apply
error: patch failed: Makefile:24
error: libavfilter/Makefile: patch does not apply
Patch failed at 0001 PATCH DESCRIPTION
When you h