欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 健康 > 养生 > git cherry-pick 合并多个提交

git cherry-pick 合并多个提交

2025/3/17 21:06:04 来源:https://blog.csdn.net/xiaozhiwise/article/details/141470542  浏览:    关键词: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

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

热搜词