首页 > 解决方案 > git - 尝试选择我已经拥有的提交后自动 git reset

问题描述

我正在尝试git cherry-pick start..end,并且我已经提交了很多提交,start..end并且每次尝试选择一个时,我都会收到这样的消息:

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

You are currently cherry-picking commit e0a5d27bed8.

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

If you wish to skip this commit, use:

    git reset

Then "git cherry-pick --continue" will resume cherry-picking
the remaining commits.

我试过rev-list这样使用:git rev-list --remove-empty --reverse start..end . | git cherry-pick --stdin

添加--remove-empty和 a.但这无济于事。

有没有办法跳过这些类型的提交?

标签: git

解决方案


推荐阅读