Github桌面不显示合并提交--no-ff [英] Github Desktop doesn't display commits from merge --no-ff

查看:320
本文介绍了Github桌面不显示合并提交--no-ff的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是的,我知道这个
Git合并--no-ff提交提交副本



我有3个提交关闭分支feature_a。
然后我回去开发分支,并做一个

  git merge --no-ff feature_a 

当我做一个

  git log --oneline 

我的列表中有4个新提交加1合并提交)。但是,在GitHub桌面中,我只看到一个,即新的合并提交。 GitHub桌面允许我看到单个提交吗?我也删除了功能分支,并且这不会改变任何内容。如何GitHub桌面隐藏我的3提交?



我知道它有两个父母,但我不知道如何GitHub桌面选择要显示的父母/链。也许这只是一个工具的限制。



我也检查过SourceTree,它显示所有提交都很好,并且知道如何正确地为分支着色这3个提交是不同的。

编辑:
实际上可以从命令行的角度来询问问题。为什么 git log 命令显示合并的一条路径(每个特征提交),并且可以将其更改为显示其他路径? > Github Desktop不提供一种方式来查看合并中的单个提交。



如果您想从命令行获得类似的输出,您可以尝试 git log --first-parent



您可以在回答


Yes I am aware of this one Git Merge --no-ff makes copy of commits

I have 3 commits off branch feature_a. Then I go back to develop branch, and do a

git merge --no-ff feature_a

When I do a

git log --oneline

I get 4 new commits in my listing (3 from before plus 1 "merge commit"). However, in GitHub Desktop, I only see one, i.e. the new "merge commit". Does GitHub Desktop allow me to see the individual commits? I've also deleted the feature branch, and that doesn't change anything. How is GitHub Desktop hiding my 3 commits?

I realize it has two parents, but I'm not sure how GitHub Desktop is choosing which parent/chain to display. Perhaps this is just a limitation of the tool.

I've also checked SourceTree and it shows all the commits fine, and somehow it knows how to colour the branching correctly so the 3 commits are different.

Edit: Actually the question can be asked from the command line perspective.. Why does the git log command show one path of the merge (with each feature commit) and can it be changed to show the other path?

解决方案

Github Desktop doesn't provide a way to see the individual commits from a merge.

If you want to get a similar output from the command line you can try git log --first-parent.

You can get more details in that answer

这篇关于Github桌面不显示合并提交--no-ff的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆