git cherry pick导致分支提前于原始/主分支

git cherry pick导致分支提前于原始/主分支,git,cherry-pick,git-cherry-pick,Git,Cherry Pick,Git Cherry Pick,我正在尝试将分支中的特定提交合并到主节点,并将它们推送到源节点 以下是我正在做的: M4600 ~/git/plutext/docx4j (master) $ git reset --hard origin/master HEAD is now at 2b2d124 Image support in non-XSLT HTML export. M4600 ~/git/plutext/docx4j (master) $ git status # On branch master nothing

我正在尝试将分支中的特定提交合并到主节点,并将它们推送到源节点

以下是我正在做的:

M4600 ~/git/plutext/docx4j (master)
$ git reset --hard origin/master
HEAD is now at 2b2d124 Image support in non-XSLT HTML export.

M4600 ~/git/plutext/docx4j (master)
$ git status
# On branch master
nothing to commit (working directory clean)

M4600 ~/git/plutext/docx4j (master)
$ git cherry-pick d89cc32b11d338c0874838a730f04f83c85021bd
[master cb6bf93] Make table output work again.
 1 files changed, 11 insertions(+), 11 deletions(-)

M4600 ~/git/plutext/docx4j (master)
$ git status
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#
nothing to commit (working directory clean)

我哪里出错了?

一点问题也没有


您只需将提交应用于本地主机,因此它现在比origin/master(远程分支)多1个,因此您只需推送它。

没有任何问题

您只需将提交应用于本地主机,因此它现在比origin/master(远程分支)多1个,所以您只需推送它