为什么 GitHub 桌面显示的历史记录就好像它仅来自我们团队中的一个人?

Why does GitHub desktop present history as if it was from only one of our team?

我在三人小组中使用 Git 来构建 iOS 应用程序。对于这个项目,我们都是基于 Mac 和 Xcode,并且有多种不同的方式来使用 Git:在 Xcode 中,使用 Github Desktop,以及来自 Bash 终端。

我对在 GitHub 桌面中看到的历史感到困惑 - 它是线性的,似乎全部来自一个开发人员。

我可以使用终端命令 git log --since='2016-05-06' --pretty=format:"%h %an %cd" --graph 查看最近几天的提交:

我可以清楚地看到最后十二次提交分布在所有三个贡献者之间。但它在 GitDesktop 中看起来不像这样:

这里所有最近的提交似乎都来自一个开发人员,并且都是线性布局的,没有 git log--graph 选项显示的分支结构。

为什么GitHub桌面呈现的是一个开发者的历史?分支结构哪里去了?如何让 GitHub Desktop 向我显示 git log 能够显示的历史记录?

我收到了 GitHub 团队的回复。

比较好的终端命令是git log --since='2016-05-06' --pretty=format:"%h %an %cd" --graph --first-parent。查看 git log documentation --first-parent 选项描述为:

Follow only the first parent commit upon seeing a merge commit. This option can give a better overview when viewing the evolution of a particular topic branch, because merges into a topic branch tend to be only about adjusting to updated upstream from time to time, and this option allows you to ignore the individual commits brought in to your history by such a merge.

在他们的回复中 GitHub 分享他们的一位开发人员对 GitHub 桌面的评价 Comparison Graph

"GitHub Desktop is optimized for GitHub Flow. In this model, merges almost always represent either (1) a branch getting merged into the default branch via a pull request or (2) a branch being updated from the default branch.

In the first case, it's most useful to see which pull requests have been merged—not the individual commits that make up that pull request. We think pull requests are amazing and very useful for understanding history, so we want to prioritize them.

In the second case, seeing the commits that came in with a merge only obscures the changes on the branch. It's most useful to see the commits that are unique to the branch."

但目标是 "in the future [they] would like to make all commits reachable in GitHub Desktop"