https://blog.csdn.net/clozxy/article/details/5830880
https://www.cnblogs.com/chenfulin5/p/6210581.html
先git log 查看commit ID, 记录你想要打的补丁的ID
比如说:
git log
commit 4ff35d800fa62123a28b7bda2a04e749addf1918
Author: chenfulin5 <chenfulin5@gmail.com>
Date: Tue Dec 20 17:37:09 2016 +0800
[I2C EEPROM]
commit acb8cd154cecf20894ae25fc3787d6b6ba9b32ea
Author: chenfulin5 <chenfulin5@gmail.com>
Date: Mon Dec 19 18:45:03 2016 +0800
[I2C0 AT24] add at24 eeprom
那么你就可以运行如下命令进行生成patch
git diff acb8cd15 4ff35d80 > patch
现在已经生成了一个patch, 那么可以使用 git apply 进行打补丁。