git patch study
gen patch
- use
git log --pretty=oneline -3list commit
gen patch after e7819 commit not include e7819, this may be gen several files. - gen patch
git format-patch e7819
if you want gen only one file use following commandgit format-patch master --stdout > fix_empty_poster.patch
between two commits patch:git format-patch 365a..4e16
apply patch
copy .patch files to a folder
take a look at what changes are in the patch
git apply --stat patch/*.patchtest before actually apply
git apply --check patch/*.patchgit am --abortabort earlier am processgit am patch/*.patch
git am --signoff < fix_empty_poster.patch