如何正确挑选提交

How to cherry-pick commit correctly

我必须从 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'

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

这意味着:

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

在这两种情况下,Git 都没有任何应用。