Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I'm using Git in a team of three to build an iOS app. For this project we are all Mac and Xcode based and have a variety of different ways of using Git: within Xcode, using Github Desktop, and from the Bash terminal.

I am confused about the history I am seeing in GitHub desktop - it is linear and appears to be all from one developer.

I can use the terminal command git log --since='2016-05-06' --pretty=format:"%h %an %cd" --graph to see the last few days' commits:

terminal git log screenshot

I can clearly see that the last twelve commits are spread between all three contributors. But it does not look like this in GitDesktop:

GitHub screenshot

Here all the recent commits seem to be from one developer, and all laid out linearly without the branching structure shown by the --graph option to git log.

Why is GitHub desktop presenting the history as one developer? Where is the branching structure gone? How do I get GitHub Desktop to show me the history that git log is able to?

like image 796
dumbledad Avatar asked May 10 '16 10:05

dumbledad


People also ask

What does pull origin do in GitHub desktop?

After you click Fetch origin, the button changes to Pull Origin. Click Pull Origin to update your local working copy with the fetched updates. Now check your files and notice that the updates that were originally in the development branch now appear in master.

Where is history on GitHub?

On GitHub, you can see the commit history of a repository by: Navigating directly to the commits page of a repository. Clicking on a file, then clicking History, to get to the commit history for a specific file.

How do I remove changes from GitHub desktop?

In GitHub Desktop, use the Current Branch drop-down, and select the local branch you want to update. To pull any commits from the remote branch, click Pull origin or Pull origin with rebase. Resolve any merge conflicts in your preferred way, using a text editor, the command line, or another tool.


1 Answers

I heard back from the GitHub team.

The terminal command that is a better comparison is git log --since='2016-05-06' --pretty=format:"%h %an %cd" --graph --first-parent. Looking at the git log documentation the --first-parent option is described as:

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.

In their reply GitHub share what one of their developers said about the GitHub Desktop 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."

But the goal is that "in the future [they] would like to make all commits reachable in GitHub Desktop"

like image 187
dumbledad Avatar answered Oct 16 '22 10:10

dumbledad