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
{{ message }}
Repository navigation
[Fork] Newly created branches on forks don't have latest work from upstream #7762
Although we maintain an upstream remote for forks cloned into GitHub Desktop, we don't use the branches fetched from it to update any of the local branches.
Put another way: "I always want a new branch I make in my fork to have the latest work in upstream."
Currently I use this workaround:
$ git checkout development
$ git pull upstream development
changed the title [-]newly created branches don't have latest work in upstream[/-][+]Newly created branches on forks don't have latest work from upstream[/+]on Jun 11, 2019
changed the title [-]Newly created branches on forks don't have latest work from upstream[/-][+][Fork] Newly created branches on forks don't have latest work from upstream[/+]on Jan 7, 2020
Based on our decision to more heavily default to contribution fork workflows in #9170 (comment), @outofambit and I thought simply defaulting to making a new branch from upstream/master made the most sense here.
From creating a branch when you're on your fork's default branch:
From creating a branch when you're on any other branch on your fork:
Does this approach make sense? Does anyone have any input on copy here?
Reacted by cypress evelyn masso, Tiernan L, Jed Fox and Steven Yeh
I think this is great @ampinsk! I'm curious if any of our external contributors who work primarily from forks (or others who work from forks) have input here too about whether this would work for your workflow. cc: @say25@j-f1@agisilaos@Daniel-McCarthy
From creating a branch when you're on your fork's default branch:
Is someone able to change this at all, or is this their only option? I generally like it, it just feels a bit risky if they don't want to pull in new things from the parent at that point, for any reason. Maybe it would be totally fine and I'm just assuming people would be either confused or want to potentially have the ability to change it.
That seems like a good idea, although I do think it would be good to have the option to select the fork’s default branch for cases where someone forks a project because it’s unmaintained.
Maybe there should be a repo-level setting to treat it as a fork or as a separate repo in its own right? That would also help with stuff like displaying PRs in the PR list, where I don’t want to see PRs on my fork.
Not sure how common maintaining a “hostile fork” is — maybe you could get stats on that somehow (i.e. what fraction of regularly updated forks on GH have their default branch ahead of the parent’s default branch)?
Not sure how common maintaining a “hostile fork” is — maybe you could get stats on that somehow (i.e. what fraction of regularly updated forks on GH have their default branch ahead of the parent’s default branch)?
Totally agree - from the data we've seen so far, we think it's extremely rare. Far more common for "maintained" forks is that they become their own repo entirely separate from the parent.
Maybe there should be a repo-level setting to treat it as a fork or as a separate repo in its own right? That would also help with stuff like displaying PRs in the PR list, where I don’t want to see PRs on my fork.
Agreed! We're thinking about that as well as part of #9170. We're not positive about a repo setting given what we shared above, and wondering whether we can just safely assume that the vast majority of people care about their fork only in the context of contributing to the parent repo.
@say25 We were initially thinking a repo setting might be appropriate as well, and we're still not opposed to that, but after digging into the data and talking to people, we think that just assuming that forks are "Contribution forks" using @ampinsk's framework here might just work, so we might start with that and move toward a repo setting if we see evidence that there's a fairly significant number of people who are using "Maintained forks" with Desktop. At the very least, it's nice to know that that default assumption would seem to make the experience better for y'all. Thanks!
Activity
[-]newly created branches don't have latest work in upstream[/-][+]Newly created branches on forks don't have latest work from upstream[/+][-]Newly created branches on forks don't have latest work from upstream[/-][+][Fork] Newly created branches on forks don't have latest work from upstream[/+]ampinsk commentedon Mar 10, 2020
Based on our decision to more heavily default to contribution fork workflows in #9170 (comment), @outofambit and I thought simply defaulting to making a new branch from upstream/master made the most sense here.
From creating a branch when you're on your fork's default branch:
From creating a branch when you're on any other branch on your fork:
Does this approach make sense? Does anyone have any input on copy here?
billygriffin commentedon Mar 10, 2020
I think this is great @ampinsk! I'm curious if any of our external contributors who work primarily from forks (or others who work from forks) have input here too about whether this would work for your workflow. cc: @say25 @j-f1 @agisilaos @Daniel-McCarthy
Is someone able to change this at all, or is this their only option? I generally like it, it just feels a bit risky if they don't want to pull in new things from the parent at that point, for any reason. Maybe it would be totally fine and I'm just assuming people would be either confused or want to potentially have the ability to change it.
j-f1 commentedon Mar 10, 2020
That seems like a good idea, although I do think it would be good to have the option to select the fork’s default branch for cases where someone forks a project because it’s unmaintained.
Maybe there should be a repo-level setting to treat it as a fork or as a separate repo in its own right? That would also help with stuff like displaying PRs in the PR list, where I don’t want to see PRs on my fork.
Not sure how common maintaining a “hostile fork” is — maybe you could get stats on that somehow (i.e. what fraction of regularly updated forks on GH have their default branch ahead of the parent’s default branch)?
billygriffin commentedon Mar 10, 2020
Thanks @j-f1!
Totally agree - from the data we've seen so far, we think it's extremely rare. Far more common for "maintained" forks is that they become their own repo entirely separate from the parent.
Agreed! We're thinking about that as well as part of #9170. We're not positive about a repo setting given what we shared above, and wondering whether we can just safely assume that the vast majority of people care about their fork only in the context of contributing to the parent repo.
say25 commentedon Mar 10, 2020
What about:
upstream/default-branch,origin/default-branch,current-branch(if applicable) as the options?I think that the general case of
upstream/default-branch(masterin most cases) makes sense but I'm fine with the approach described abovebillygriffin commentedon Mar 11, 2020
@say25 We were initially thinking a repo setting might be appropriate as well, and we're still not opposed to that, but after digging into the data and talking to people, we think that just assuming that forks are "Contribution forks" using @ampinsk's framework here might just work, so we might start with that and move toward a repo setting if we see evidence that there's a fairly significant number of people who are using "Maintained forks" with Desktop. At the very least, it's nice to know that that default assumption would seem to make the experience better for y'all. Thanks!
say25 commentedon Mar 11, 2020
@billygriffin that makes perfect sense to me, I think in general "Contribution Forks" are the expected workflow