Skip to content

Feature Request: Sync with upstream repository #6862

Closed

Description

@borpin

When working on an upstream repository, I will clone that into my own GitHub (origin) then connect that repository to Desktop. I only ever want to work on origin/branch, but want to keep the origin/master in sync with the upstream/master.

The only way I have found (assuming I have added the upstream already) is to, from the CLI, do

git pull upstream master
git push origin master

Being able to do this more easily would really help (I have to look it up every time).

ref #3199 - upstream url added automatically - great.

Activity

  1. j-f1 commented on Feb 15, 2019

    @j-f1
    Contributor

    You can go into the Compare tab and merge in upstream/master.

  2. borpin commented on Feb 15, 2019

    @borpin
    Author

    Not seeing a compare tab (not saying it isn't there)

    image

  3. borpin commented on Feb 15, 2019

    @borpin
    Author

    OK yes I see now. Not obvious but great.

  4. shiftkey commented on Feb 15, 2019

    @shiftkey
    Member

    @borpin we also have a "Notification of Diverging from Default Branch" feature that might help here. It was originally implemented in #4969 and has been around for a while, and I'd love to figure out why it's not working for you as the fork scenario is one that we had in mind when we implemented it.

    An example of it in action:

    We've wanted to prompt in a timely manner without being too disruptive, and maybe there's something with your setup that means this isn't showing up at the appropriate time. Is this something that interests you? If so, we can try and dig into why you're not seeing it.

  5. reopened this on Feb 15, 2019
  6. borpin commented on Feb 15, 2019

    @borpin
    Author

    Thanks, It could be I was not looking for it. I'll keep an eye out for it.

    It does interest me. I'll keep an eye out and see if I just missed it. As it is in 'History' it is not as obvious as it might be. You could argue that, as it relates to changes perhaps it should appear on that tab.

    One thing, in that screenshot, under 'Current Repository' it would be useful if it said where it was from, so for me, when I am on my fork, I'd see borpin/xxxxx and if I was on the upstream I'd see upstream-repo/xxxxx. At the moment as it just says xxxxx is is ambiguous.

  7. shiftkey commented on Feb 15, 2019

    @shiftkey
    Member

    @borpin that screenshot isn't ideal because it's not working from a fork (hence the different icon in the "Current Repository" area). If I were working in a fork, it would be comparing to upstream/[default-branch-name] which sounds like what you're interested in.

  8. borpin commented on Feb 15, 2019

    @borpin
    Author

    So this is the upstream (I see now the icon at the side changes for upstream v fork - very subtle) - I'd like to see the same text you see in the dropdown.

    image

    You can see here there is a dropdown arrow which is telling me I am 103 commits behind.

    image

    If I click on the arrow I now see,

    image

    Ah, it says origin remote, I'd expect it to say upstream (I'd thought origin was always the fork).

    So I've worked out how to do it, thanks to your prompting, but I am not seeing it as a friendly message you showed above 😄.

  9. shiftkey commented on Feb 15, 2019

    @shiftkey
    Member

    @borpin thanks for the extra screenshot, this definitely helps me understand your situation further!

    You've touched on a few different areas about how we deal with forks, but it's late on Friday here and I'd like to extract these out to independent items (or reference existing issues) so we can discuss and prioritize them accordingly.

  10. borpin commented on Feb 16, 2019

    @borpin
    Author

    @shiftkey, happy with that. I'm on UK time.

  11. borpin commented on Feb 16, 2019

    @borpin
    Author

    Just opened a repo that I forked a while ago. GitHub web shows

    image

    But I am getting nothing in Desktop that indicates this (not even the arrow in the 'Current Repository' dropdown). I saw an issue regarding Desktop asking about adding in the remote upstream when a repository was cloned, but I did not see that as an option.

    There is the Origin in the Repository settings, but no option to include an upstream.
    image

  12. self-assigned this
    on Feb 19, 2019
  13. shiftkey commented on Feb 19, 2019

    @shiftkey
    Member

    @borpin some extra context on the flow you went through:

    You can see here there is a dropdown arrow which is telling me I am 103 commits behind.

    image

    This arrow is used to show the ahead/behind details for your current branch, using tracking branch set in configuration (this will likely be on origin).

    If I click on the arrow

    This icon is not intended to be clickable, but this is an interesting bit of feedback about the UX.

    image

    Ah, it says origin remote, I'd expect it to say upstream (I'd thought origin was always the fork).

    This is a new action that was added as part of #6445 and is also based on your current tracked branch. Git doesn't support tracking multiple branches, so this is where our prompt about "Your branch is XYZ commits behind [default branch]" comes in.

    I've opened #6875 as a proposal to make this flow more intuitive, and I'd love to hear your input there based on your current experiences with working with forks in the app.

    There is the Origin in the Repository settings, but no option to include an upstream.
    image

    Desktop should be adding an upstream remote for the fork once it's tracked in the app, if it's a GitHub repository. I've opened #6877 to discuss making this more prominent in the UI.

    I'm going to close this out as I think those are the fork-specific issues worth discussing in more detail, but feel free to open fresh issues if there are other things you would like to see improved about how we handle forks in the app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions