【问题标题】:How to cherry-pick commit correctly [closed]如何正确选择提交[关闭]
【发布时间】:2021-04-08 06:10:11
【问题描述】:

我必须从 issue-7044a 分支中挑选提交到 issue-7044 以及何时运行

git cherry-pick <commit-hash>

我收到:

On branch issue-7044
Your branch is up to date with 'origin/issue-7044'.

You are currently cherry-picking commit <hash>.
  (all conflicts fixed: 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)

nothing to commit, working tree clean
The previous cherry-pick is now empty, possibly due to conflict resolution.
If you wish to commit it anyway, use:

    git commit --allow-empty

Otherwise, please use 'git cherry-pick --skip'

并且存储库文件夹没有变化,我该怎么办? (我需要从该提交中复制所有文件)

【问题讨论】:

    标签: git command-line branch cherry-pick


    【解决方案1】:

    这意味着:

    • 从 issue-7044a 中挑选的提交已经是 issue-7044 分支的一部分(例如通过合并)
    • 或该提交引入的更改已应用于目标分支

    在这两种情况下,Git 都不需要应用任何内容。

    【讨论】:

    • 换句话说:所有文件都已经存在
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-01-20
    • 1970-01-01
    • 1970-01-01
    • 2016-02-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多