Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
git-在尝试选择已提交的提交后自动重置git_Git - Fatal编程技术网

git-在尝试选择已提交的提交后自动重置git

git-在尝试选择已提交的提交后自动重置git,git,Git,我正在尝试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 e0

我正在尝试
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--删除空--反向开始..结束。|git cherry pick--stdin

通过添加
——删除空的
,但这没有帮助


有什么方法可以跳过这些类型的提交吗?

使用
git cherry pick
而不是
git rebase
有什么原因吗?我不知道这是否会有影响,但可能。为什么不解决冲突呢?@matt没有冲突。当它尝试选择一个提交时,更改已经在我的树中完成了!因此,也许再基会更好,因为它知道如何跳过这些。重基是重复的樱桃选择,所以你应该得到想要的结果。@matt事情是这样的。我的树没有这些的git历史记录。这是OEM linux内核源代码删除(1个提交内核)使用
git cherry pick
而不是
git rebase
有什么原因吗?我不知道这是否会有影响,但可能。为什么不解决冲突呢?@matt没有冲突。当它尝试选择一个提交时,更改已经在我的树中完成了!因此,也许再基会更好,因为它知道如何跳过这些。重基是重复的樱桃选择,所以你应该得到想要的结果。@matt事情是这样的。我的树没有这些的git历史记录。这是一个OEM linux内核源代码删除(1个提交内核)