搞了一个早上,终于把PATCH提交到社区了,等待审批。
1/ git-clone project.repo.git
2/ do some modifications
3/ git-commit -a -m "your message that will appare as the PATCH title and description"
4/ git-format-patch -s origin
# generate a patch by option
# -s is add signed-off-by line
# origin is the original branch that you must not touch
# this will generate a patch named as "0001xxxx.txt" in the currently directory
5/ git-send-email --to to_email@addr_list --cc cc_email@addr_list 0001xxxx.txt
# this will send the patch as the email body. Also git do some format things for us like as fetch Subject/From lines and so on.
OK. 完成了。 这就是一般开发人员提交PATCH的大致过程了,需要注意的是 send-email 用到了 sendmail,我用的debian, 用的是 exim4, 那么就需要配置一下了,google 吧。
总有一天会接受我的PATCH的。
[纪念:内核也有我1行代码啦......116]

本文详细介绍了如何使用Git将代码更改打包成PATCH文件,并将其发送至指定邮箱以供代码审查的过程。包括克隆仓库、修改代码、提交更改、生成及发送PATCH等步骤。
4695





