当前位置: 首页 > news >正文

git cherry-pick 合并多个提交

/* 多提交合并 */
将 flymap4 多个提交合并到 b_flymap4_202508

git checkout b_flymap4_202508
git lg flymap4                          // 5178ae4b .. e7980ec5, 共四个

git cherry-pick 5178ae4b^ .. e7980ec5

    Performing inexact rename detection: 100% (442092/442092), done.
    Auto-merging Hardware/Hi3519Cam/PhotoSnap/PhotoSnap_Impl.cpp
    CONFLICT (content): Merge conflict in Hardware/Hi3519Cam/PhotoSnap/PhotoSnap_Impl.cpp
    error: could not apply 5178ae4b... [Mod] 抽一帧存JPG照片
    hint: after resolving the conflicts, mark the corrected paths
    hint: with 'git add <paths>' or 'git rm <paths>'
    hint: and commit the result with 'git commit'

git status

    On branch b_flymap4_202508
    Your branch is up to date with 'origin/b_flymap4_202508'.

    Cherry-pick currently in progress.
      (fix conflicts and run "git cherry-pick --continue")
      (use "git cherry-pick --skip" to skip this patch)
      (use "git cherry-pick --abort" to cancel the cherry-pick operation)

    Changes to be committed:
            modified:   Hardware/Hi3519Cam/CMakeLists.txt
            new file:   Hardware/Hi3519Cam/PhotoSnap/FlymapControl.cpp
            modified:   Hardware/Hi3519Cam/PhotoSnap/PhotoSnap_Impl.h
            new file:   Hardware/Hi3519Cam/PhotoSnap/flymap_vsync.h

    Unmerged paths:
      (use "git add <file>..." to mark resolution)
            both modified:   Hardware/Hi3519Cam/PhotoSnap/PhotoSnap_Impl.cpp

vi Hardware/Hi3519Cam/PhotoSnap/PhotoSnap_Impl.cpp
git add Hardware/Hi3519Cam/PhotoSnap/PhotoSnap_Impl.cpp
git cherry-pick --continue

    [Mod] 抽一帧存JPG照片
      
    Change-Id: Id1369da2b4b044039fb801dd935c26b6a60ce077

    /* 解决冲突时删除上面的即可 */
    # Conflicts:    
    #       Hardware/Hi3519Cam/PhotoSnap/PhotoSnap_Impl.cpp
    #
    # It looks like you may be committing a cherry-pick.
    # If this is not correct, please remove the file
    #       .git/CHERRY_PICK_HEAD
    # and try again.


    # Please enter the commit message for your changes. Lines starting
    # with '#' will be ignored, and an empty message aborts the commit.
    #
    # Date:      Mon Aug 12 13:58:40 2024 +0800
    #
    # On branch b_flymap4_202508
    # Your branch is up to date with 'origin/b_flymap4_202508'.
    #
    # Cherry-pick currently in progress.
    #
    # Changes to be committed:
    #       modified:   Hardware/Hi3519Cam/CMakeLists.txt
    #       new file:   Hardware/Hi3519Cam/PhotoSnap/FlymapControl.cpp
    #       modified:   Hardware/Hi3519Cam/PhotoSnap/PhotoSnap_Impl.cpp
    #       modified:   Hardware/Hi3519Cam/PhotoSnap/PhotoSnap_Impl.h
    #       new file:   Hardware/Hi3519Cam/PhotoSnap/flymap_vsync.h

git cherry-pick --continue

    [b_flymap4_202508 1e50d2bc] [Mod] 增加 MessageBus 头文件与源码路径,以处理合并后编译报找不到头文件的异常
     Date: Fri Aug 23 11:41:51 2024 +0800
     1 file changed, 4 insertions(+), 3 deletions(-)

git status

    On branch b_flymap4_202508
    Your branch is ahead of 'origin/b_flymap4_202508' by 4 commits.
      (use "git push" to publish your local commits)

    nothing to commit, working tree clean

git push origin HEAD:refs/for/b_flymap4_202508


http://www.mrgr.cn/news/9216.html

相关文章:

  • linux之网络子系统-tcpdump 原理
  • PHP轻创推客集淘客地推任务平台于一体的综合营销平台系统源码
  • 背包问题(完全背包)
  • Java Web —— 第七天(Mybatis案例 部门管理)
  • EXCEL 分段排序--Excel难题#86
  • 不良贷款只有“贷款逾期”?你知道还有“呆滞”、“呆账”贷款吗?
  • 数学基础 -- 微积分之线性化
  • docker升级docker pull mysql:5.7.37异常
  • 【鼠鼠学AI代码合集#3】简单的数据操作 (pytorch)
  • BCEWithLogitsLoss
  • 大模型在应用开发安全左移实践
  • C#中的压缩与解压缩:掌握内置功能的艺术
  • Matlab自学笔记三十四:表table的排序、查找、提取、删除、计算、与结构数组的转换
  • CSS\JS实现页面背景气泡logo上浮效果
  • ubuntu20.04源码编译安装qemu(qemu8.2)
  • 01 BlockChain--
  • ReactRouter6快速入门教程
  • webdriver 反爬虫 (selenium反爬虫) 绕过
  • 手机谷歌浏览器怎么用
  • 【HuggingFace Transformers】BertSdpaSelfAttention源码解析