【生成patch,打patch】
git format-patch -1 commi号
patch -p1 < boot_dead_bug.patch
git commit --amend //第二次提交,或者忘记提交某些文件。在提交之前要git pull
编译方法:
make alim3527_ddk_c0100_nand_defconfig
make allnopackageconfig
make all
git cherry-pick commit号 不同分支相互也可以,只要没有冲突
commit bbb4723073770b027b5140b45f4a0e449d0fd3e5
Author: charlie.chen <charlie.chen@alitech.com>
Date: Thu Mar 30 18:45:44 2017 +0800
Fixed UBI mtdparts cmd fail with Device nand0 not found
比如,我在uboot 3.2 上面的提交,想提交到uboot 3.1上面
就可以
charlie.chen@zhsa01:~/work/u-boot-ali$ git branch
3.1
* 3.2
S3922
master
charlie.chen@zhsa01:~/work/u-boot-ali$ git cherry-pick bbb4723073770b027b5140b45f4a0e449d0fd3e5
[3.2 cd10e1d] Fixed UBI mtdparts cmd fail with Device nand0 not found
Date: Thu Mar 30 18:45:44 2017 +0800
1 file changed, 13 insertions(+), 2 deletions(-)
mode change 100644 => 100755 drivers/mtd/spi/sf_probe.c
1.commit cd10e1d6f96b89f1be7ae7b459e3c28b75427fe6
Author: charlie.chen <charlie.chen@alitech.com>
Date: Thu Mar 30 18:45:44 2017 +0800
Fixed UBI mtdparts cmd fail with Device nand0 not found
2.commit cc5932863a910d8b80b0631e194345c7ddcd2e3e
Author: charlie.chen <charlie.chen@alitech.com>
Date: Tue Mar 21 14:53:48 2017 +0800
Update OTP R/W CMD API
比如上面的两次提交,提交1的话,肯定有merge ,因为中间有其他人提交了
可以这样
保留1的commit号,先git reset --hard commit2
然后 git cherry-pick commit1
然后 git push origin 3.2
git reflog
git log --oneline -5
列出git仓库的 名字
charlie.chen@zhsa01:~/work/streeAliboot/aliboot-p4$ git remote -v
origin git@zhsa01:stu-pdk/aliboot-p4.git (fetch)
origin git@zhsa01:stu-pdk/aliboot-p4.git (push)
联系客服