Reference blog:
https://www.cnblogs.com/laoxiaobaiup/p/9455088.html
https://blog.csdn.net/u012701023/article/details/82984026
1.
diff -u oldfile newfile > 1.patch
2. Place the patch hit oldfile, note p1 refers to ignore the first level directory, a directory which refers 1.patch file
patch -p1 oldfile < 1.patch
3. Use git hit patch
git format-patch HEAD^
git format-patch commit_id1..commit_Id2