Change default base repository for pull requests on forks #11729
Replies: 110 comments 65 replies
-
GitHub has a default branch setting. The page says:
Unless I am missing something, that setting is not respected for PRs on a fork, given that the default branch of the upstream repo seems to be taken as the base branch for the PR. How about adding a
When creating a PR, these settings could be used to give the current behavior. Then users could change the settings to fit their needs. I'd be happy to learn about any implications I might be missing 😁 |
Beta Was this translation helpful? Give feedback.
-
The current developer experience is really hard to work with -- I've incorrectly opened (and then closed) PRs to upstream several times at this point and I'm going to have to just remove my upstream association which is a real shame. Would love a solution to this for future projects! |
Beta Was this translation helpful? Give feedback.
-
👋 Hi, hi! Wanted to let the group know that we are investigating this (thank you for this feedback, it's extremely helpful for planning!) and I'll update here when I have some more news ✨ |
Beta Was this translation helpful? Give feedback.
-
Why is this not a setting? One of the main use cases for Forking a repository is to take over a project that is out of maintenance - where the previous owner is ignoring all PRs. Please @github-staff consider just making it a setting so we don't have to click 3 times on every PR to avoid accidentally PR'ing the fork. Thanks. |
Beta Was this translation helpful? Give feedback.
-
Please provide this setting. |
Beta Was this translation helpful? Give feedback.
-
This behavior is so frustrating. As a workaround, to detach a repository you can request a ticket here: https://support.github.com/contact?tags=rr-forks&subject=Detach%20Fork&flow=detach_fork |
Beta Was this translation helpful? Give feedback.
-
I can attest - this is very annoying. |
Beta Was this translation helpful? Give feedback.
-
I have a website template that people fork to use, and the github.com UI for pull requests defaulting to the upstream repo instead of the base repo has caused so many people (including me!) to open accidental PRs (against the template itself instead of their own main branch) that I had to create a label specifically for it: |
Beta Was this translation helpful? Give feedback.
-
Same problem here! Just today I closed a PR just clicks before merging it to master on the wrong repository. |
Beta Was this translation helpful? Give feedback.
-
Same situation here, we want to work mainly in our fork and contribute some PRs upstream, so we don't want to detach. We had some accidental PRs already, and it's embarrassing. Please let us configure the default |
Beta Was this translation helpful? Give feedback.
-
Yet another frustrated user who's trying to keep the fork link without having to manually check where I'm pushing my PR to. Please, fix this. |
Beta Was this translation helpful? Give feedback.
-
This starts to suck. The thread is over a year old and as far as I could see has gotten no reaction from GitHub. There are two aspects to this that make this very annoying: first, it's bothering lots of people and second, as I pointed out in my earlier post, this should be relatively easy to fix. One option to potentially get some traction with this, is for someone with an appropriate account type (Pro, Enterprise etc.) to open a support ticket and point this out. I've had success doing that with Atlassian but I only have a free GitHub account myself. |
Beta Was this translation helpful? Give feedback.
-
bumping the thread since the absence of such an obvious feature is incredibly frustrating. |
Beta Was this translation helpful? Give feedback.
-
Just piling into to this thread to add a +1 to this being a weird hole in the GitHub experience. |
Beta Was this translation helpful? Give feedback.
-
So this settings is actually missing? What a shame, really. Being able to select a default |
Beta Was this translation helpful? Give feedback.
-
So +1... |
Beta Was this translation helpful? Give feedback.
-
+1 |
Beta Was this translation helpful? Give feedback.
-
Wishing to have feedback on this as well. Thank you. |
Beta Was this translation helpful? Give feedback.
-
Bumping this branch for another reason. I have a fork of a project which contains hundreds of SVG files, and every time I go to create a pull request the number of SVG previews literally causes Safari to hang. |
Beta Was this translation helpful? Give feedback.
-
Yeah, the question of this issue has evolved from "set the default repo for a PR" to why GitHub seems to not pay attention. Previously, I had asked whether there is an enterprise customer reading this who could raise this with their GitHub contact. That should be one way to get some attention for this. |
Beta Was this translation helpful? Give feedback.
-
More discussion at https://github.community/t/changing-the-default-pr-target-when-creating-a-pr-from-a-fork/2842/2 |
Beta Was this translation helpful? Give feedback.
-
The output of |
Beta Was this translation helpful? Give feedback.
-
It seems like it might be possible to modify this behavior using GitHub Desktop (but apparently not with the GitHub web interface?). I haven't tried a Pull Request after doing this, but hopefully it'll work... In the GitHub docs, under GitHub Desktop/Contributing and collaborating/Add & clone repos/Clone & fork from Desktop/Managing fork behavior:
Note that the screenshots (and precise instructions) may be different if you visit the above support page on Windows rather than Mac. |
Beta Was this translation helpful? Give feedback.
-
As of today this seems to be working as expected again. No more mentions of too many changes. |
Beta Was this translation helpful? Give feedback.
-
As of today this seems to be working as expected again. No more mentions of too many changes. |
Beta Was this translation helpful? Give feedback.
-
Another +1 into the void |
Beta Was this translation helpful? Give feedback.
-
This might help: From the git docs:
Admittedly, having each developer need to go in and edit |
Beta Was this translation helpful? Give feedback.
-
Fwiw, what I do is I have:
I do my work in I have a script which sets this up (it also changes the default branch of both of my forks and adds some groups and other stuff). |
Beta Was this translation helpful? Give feedback.
-
I've forked a repository which has been archived by the owner, so there won't be any prs accepted to the original repository.
Therefore I'd like to change the base repository for all PRs made from to my repository but this seems not possible.
Is there a recommended way to deal with this situation other than (re)creating the repository without forking?
Thanks a lot!
Beta Was this translation helpful? Give feedback.
All reactions