You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Design time! 😄 Here are a couple problems we are aiming to solve with comparing between two branches:
There currently isn't a way to see how far we've diverged from a branch. As a result, it's easy for our working branch to diverge from a default branch (such as master) over time.
There's no easy to see what kind of changes are about to be brought in. This also adds to the difficulty of not being able to see if there are any overlapping work.
I started off with a version where I played around with a graph/timeline/subway map visualization to show which commits existed on which branch. The goal at the time was to be able to visualize the result of a merge (as well as understand which specific commits would be brought in:
After some discussion, we've agreed on some of the limitations of that design:
The graph doesn't offer any value and (not seen in the crop) doesn't accurately represent events such as merges.
We're not convinced of the value of showing all of the commits
We're losing precious horizontal space
Fast-forward a few rounds of back and forth designing, we landed on a flow on what we think comparing (and merging upstream changes) could look like:
Comparing & Merging Flow
When it's time to see how far a working branch has diverged from another, the developer will click into the "Compare" tab (formerly "History"). When there's initially no branch being compared to, we'll display the working branch's history.
Clicking on the "Choose a branch..." will open a little dropdown where the developer can search for a branch to compare.
After selecting a branch, the list will filter down to only the commits that the working branch is missing from the target branch. From there, the developer can choose to merge those commits into their working branch, or they can stop comparing by selecting "None" in the branch dropdown.
Another problem we plan on tackling for 1.1 is merge conflict. We thought that the merge section could be an opportunity to surface a conflict ahead of time instead of presenting an error after clicking "merge." We will still allow them to attempt a merge, and we'll then kick off into the merge conflict resolution flow.
Reacted by Waleed Ashraf, James Peters, Josh Abernathy, hatoya and Jed Fox
For showing commits on the current branch that aren’t on the branch being compared with, you could add a second level of tabs with one saying “Ahead 8️⃣”and the other saying “Behind 4️⃣”
It might be useful to show “⬆️ 4 ⬇️ 8” for each branch in the branch picker to help choose which one to compare with.
The compare dropdown should have a ✖️ in it when you’ve selected a branch to compare with, allowing you to go back to the history view.
“Choose a branch…” should be a combobox, allowing people to type in a custom ref (ex. master@{1day})
It would be nice to see the relationship between more than just two branches.. its often useful to see which branch is the most recent branch without having to compare each branch. In a decent graph this is apparent in the blink of an eye. As j-f1 mentions (point nr 2) visualizing the relationship for all branches would help.
It might be nice to just have a compressed network view that showed the branch that you're currently on, the branch it branched off of, and then the branch you're targeting if you've opened a pull request targeting a different branch.
I think all those mocks address the case where my comparison branch is ahead of my branch. I'm curious if you've thought about the flip side where my branch is ahead.
For me, this is currently the only time I use our History view, and it can be pretty painful. My process is usually something like:
"Huh, what did this look like before I changed it?"
Scroll through history, hoping I haven't merged master in so I can find the commits on my branch.
I fastidiously keep my branch up to date, so I can't find my commit.
Open the compare page on GitHub.com.
I imagine we'll keep iterating on the "Compare" view so this isn't necessarily something we need to address immediately, but it is a common use case for me.
Just a quick update here. We still have some work to do here. Those mocks are some initial explorations but we don't feel like we're done or that we've addressed the whole problem yet. Please bear with us as we try to figure this out.
I think all those mocks address the case where my comparison branch is ahead of my branch. I'm curious if you've thought about the flip side where my branch is ahead.
Our current thinking around this is that the notification part (which haven't been described fully yet) will focus on the behind scenario. We want to focus on the forward momentum primarily. That said we absolutely want the compare view to be able to answer the questions you've described here but our current thinking is that it will be an explicit action and not something where the app automatically informs you of what's been going on in your branch.
So, to summarize. Our main focus here is the scenario where something has happened on master and you don't necessarily know about it. We want to surface that you're no longer up to date and easily see what's changed as well as provide a way to get up to date quickly. Once that's fully fleshed out we'll look at other workflows that the compare tab can help out with.
IMHO: the former subway-map style timeline display was great, easy to understand, and made it very easy to click through a bunch of different commits on either branch to see what has happened.
I think horizontal is easier to understand than vertical, especially because (in order to be consistent with the list of commits) a vertical timeline needs to run backwards in as you read down the diagram. That is counterintuitive and confusing.
Reacted by Ruiyang Li, Matt Morgis, Edwin Veldhuizen, Brandon Kalinowski, Bill Searle, Elia Schito, Brian Mapes, JAG, Christian Bellman, AnisChihi and 7 more
The subway-map style timeline display is the best way. No need to reinvent the wheel there. There is no sense trying to implement it somewhere else under a menu or tab to save screen real estate. Please add that functionality back. It makes a lot of sense from a UX perspective.
Reacted by André Pessoa, Stephen Peters, Brian Mapes, JAG, kleydon, Christopher Ruoti, Gifford Nowland, Christian Bellman, AnisChihi, Marcelo Melara and 8 more
Activity
joshaber commentedon Sep 7, 2017
(This should probably be split up more once we have designs.)
WaleedAshraf commentedon Sep 20, 2017
Any time estimates for this feature ?
joshaber commentedon Sep 20, 2017
@WaleedAshraf Nope, we're still in the early phases. A lot of design still has to happen before we implement it.
donokuda commentedon Oct 2, 2017
Design time! 😄 Here are a couple problems we are aiming to solve with comparing between two branches:
I started off with a version where I played around with a graph/timeline/subway map visualization to show which commits existed on which branch. The goal at the time was to be able to visualize the result of a merge (as well as understand which specific commits would be brought in:
After some discussion, we've agreed on some of the limitations of that design:
Fast-forward a few rounds of back and forth designing, we landed on a flow on what we think comparing (and merging upstream changes) could look like:
Comparing & Merging Flow
Another problem we plan on tackling for 1.1 is merge conflict. We thought that the merge section could be an opportunity to surface a conflict ahead of time instead of presenting an error after clicking "merge." We will still allow them to attempt a merge, and we'll then kick off into the merge conflict resolution flow.
j-f1 commentedon Oct 2, 2017
Looks awesome @donokuda!
master@{1day})ikriz commentedon Oct 3, 2017
It would be nice to see the relationship between more than just two branches.. its often useful to see which branch is the most recent branch without having to compare each branch. In a decent graph this is apparent in the blink of an eye. As j-f1 mentions (point nr 2) visualizing the relationship for all branches would help.
mreisz7 commentedon Oct 9, 2017
It might be nice to just have a compressed network view that showed the branch that you're currently on, the branch it branched off of, and then the branch you're targeting if you've opened a pull request targeting a different branch.
joshaber commentedon Oct 10, 2017
This looks like a great start @donokuda!
I think all those mocks address the case where my comparison branch is ahead of my branch. I'm curious if you've thought about the flip side where my branch is ahead.
For me, this is currently the only time I use our History view, and it can be pretty painful. My process is usually something like:
masterin so I can find the commits on my branch.I imagine we'll keep iterating on the "Compare" view so this isn't necessarily something we need to address immediately, but it is a common use case for me.
niik commentedon Oct 31, 2017
Just a quick update here. We still have some work to do here. Those mocks are some initial explorations but we don't feel like we're done or that we've addressed the whole problem yet. Please bear with us as we try to figure this out.
Our current thinking around this is that the notification part (which haven't been described fully yet) will focus on the behind scenario. We want to focus on the forward momentum primarily. That said we absolutely want the compare view to be able to answer the questions you've described here but our current thinking is that it will be an explicit action and not something where the app automatically informs you of what's been going on in your branch.
So, to summarize. Our main focus here is the scenario where something has happened on master and you don't necessarily know about it. We want to surface that you're no longer up to date and easily see what's changed as well as provide a way to get up to date quickly. Once that's fully fleshed out we'll look at other workflows that the compare tab can help out with.
cpcallen commentedon Dec 6, 2017
IMHO: the former subway-map style timeline display was great, easy to understand, and made it very easy to click through a bunch of different commits on either branch to see what has happened.
I think horizontal is easier to understand than vertical, especially because (in order to be consistent with the list of commits) a vertical timeline needs to run backwards in as you read down the diagram. That is counterintuitive and confusing.
brandonkal commentedon Dec 14, 2017
The subway-map style timeline display is the best way. No need to reinvent the wheel there. There is no sense trying to implement it somewhere else under a menu or tab to save screen real estate. Please add that functionality back. It makes a lot of sense from a UX perspective.
kleydon commentedon Feb 6, 2018
Really missing the comparison graph.
jmanwiller commentedon Feb 7, 2018
Really need that comparison graph - where is the option to compare branches and then merge? Wy was this removed in the first place?
nerdneha commentedon Feb 8, 2018
I'm closing this in favor of our new feature issue on relationship between branches feature work 👉 #3956