Git 如何判断合并中包含哪些提交?
我使用以下命令将branch develop合并到branch my功能中:Git 如何判断合并中包含哪些提交?,git,merge,Git,Merge,我使用以下命令将branch develop合并到branch my功能中: $ git merge --no-ff develop 我预计之后,我的功能分支将领先于origin/my功能两次提交:合并提交和我想要引入的另一次提交。但是,git status报告说它领先三次提交: $ git status On branch my-feature Your branch is ahead of 'origin/my-feature' by 3 commits. (use "git push
$ git merge --no-ff develop
我预计之后,我的功能分支将领先于origin/my功能两次提交:合并提交和我想要引入的另一次提交。但是,git status
报告说它领先三次提交:
$ git status
On branch my-feature
Your branch is ahead of 'origin/my-feature' by 3 commits.
(use "git push" to publish your local commits)
nothing to commit, working directory clean
我想在不梳理日志的情况下找出合并中包括哪些提交。是否有命令列出它们或只是列出“前面”的提交?我尝试了一次硬重置,并使用了git merge--log,以为它会在日志消息中列出它们,但它只显示了一次提交。您可以使用
git log origin/my-feature..my-feature
查看分支中尚未推送的提交(前一个提交)
由于您已经使用了my feature
,您可以将其缩短为:
git log origin/my-feature..