git 生成patch 方法

2021-05-24 01:50:13 字數 768 閱讀 4086

用git生成patch檔案然後用email的方式提交

git clone git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth-next-2.6.git

cd bluetooth-next-2.6

2,修改**

vi drivers/bluetooth/btusb.c

3,把**新增到git管理倉庫

git add drivers/bluetooth/btusb.c

4,提交修改

git commit -m "added atheros3012 chip firmware download support"

5,檢視日誌

git log <== to git the previous commit hash code.

6,生成patch

git format-patch -s 1bbe3c8c197a35f79bfddaba099270a2e54ea9c7

please replace the hash code with your repo previous commit.

then you can find the patch under repo directory.

then mail your patch to configuration admin. 

7,退回去

git reset --hard 1bbe3c8c197a35f79bfddaba099270a2e54ea9c7

git 生成patch 方法

用git生成patch檔案然後用email的方式提交 git clone git cd bluetooth next 2.6 2,修改 vi drivers bluetooth btusb.c 3,把 新增到git管理倉庫 git add drivers bluetooth btusb.c 4,提交...

如何使用git 生成patch

git clone git cd bluetooth next 2.6 2,修改 vi drivers bluetooth btusb.c 3,把 新增到git管理倉庫 git add drivers bluetooth btusb.c 4,提交修改 git commit m added ather...

生成patch和打patch

單個檔案 diff un ori file mdf file mdf file.patch 生成patc 件 patch p0 mdf file.patch 將patch修改應用到源 patch re p0 mdf file.patch 回退patch的修改多個檔案 diff unr ori dir...