【问题标题】:How to merge a previous commit of one file from another branch如何合并来自另一个分支的一个文件的先前提交
【发布时间】:2017-08-28 00:24:30
【问题描述】:

我认为我可以做到这一点,但后来我开始输入命令,我就像让我们备份并确保我做对了!

提前谢谢你!

【问题讨论】:

标签: git github merge


【解决方案1】:

获取commit id,切换到要合并的分支,进行cherry-pick,如下:

git checkout another-branch
git cherry-pick commit-id-hash

【讨论】:

    猜你喜欢
    • 2021-12-29
    • 1970-01-01
    • 2018-03-12
    • 2018-11-18
    • 2016-03-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-10-30
    相关资源
    最近更新 更多