Skip to content

Relationship between branches #2639

Closed
Closed

Description

@joshaber
  • Show how the current branch relates to the target branch
  • The target is the default branch or the upstream's default branch
  • Probably let the user switch the target branch

Designs TBD

Activity

  1. added
    design-input-needed
    on Sep 7, 2017
  2. added this to the 1.1 milestone on Sep 7, 2017
  3. joshaber commented on Sep 7, 2017

    @joshaber
    ContributorAuthor

    (This should probably be split up more once we have designs.)

  4. WaleedAshraf commented on Sep 20, 2017

    @WaleedAshraf
    Contributor

    Any time estimates for this feature ?

  5. joshaber commented on Sep 20, 2017

    @joshaber
    ContributorAuthor

    @WaleedAshraf Nope, we're still in the early phases. A lot of design still has to happen before we implement it.

  6. donokuda commented on Oct 2, 2017

    @donokuda
    Contributor

    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.

    image

    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:

    screen shot 2017-09-20 at 9 27 45 am

    Comparing & Merging Flow

    1. 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.
    2. Clicking on the "Choose a branch..." will open a little dropdown where the developer can search for a branch to compare.
    3. 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.

    screen shot 2017-09-20 at 9 28 20 am

  7. j-f1 commented on Oct 2, 2017

    @j-f1
    Contributor

    Looks awesome @donokuda!

    1. 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️⃣”
    2. It might be useful to show “⬆️ 4 ⬇️ 8” for each branch in the branch picker to help choose which one to compare with.
    3. 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.
    4. “Choose a branch…” should be a combobox, allowing people to type in a custom ref (ex. master@{1day})
  8. ikriz commented on Oct 3, 2017

    @ikriz

    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.

  9. mreisz7 commented on Oct 9, 2017

    @mreisz7

    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.

  10. joshaber commented on Oct 10, 2017

    @joshaber
    ContributorAuthor

    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:

    1. "Huh, what did this look like before I changed it?"
    2. Scroll through history, hoping I haven't merged master in so I can find the commits on my branch.
    3. I fastidiously keep my branch up to date, so I can't find my commit.
    4. 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.

  11. modified the milestones: 1.1, on Oct 23, 2017
  12. niik commented on Oct 31, 2017

    @niik
    Member

    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.

  13. cpcallen commented on Dec 6, 2017

    @cpcallen

    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.

  14. brandonkal commented on Dec 14, 2017

    @brandonkal

    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.

  15. kleydon commented on Feb 6, 2018

    @kleydon

    Really missing the comparison graph.

  16. jmanwiller commented on Feb 7, 2018

    @jmanwiller

    Really need that comparison graph - where is the option to compare branches and then merge? Wy was this removed in the first place?

  17. nerdneha commented on Feb 8, 2018

    @nerdneha
    Contributor

    I'm closing this in favor of our new feature issue on relationship between branches feature work 👉 #3956

  18. locked as resolved and limited conversation to collaborators on Jul 18, 2018
  19. unlocked this conversation on Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    design-input-neededenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions