I'm maintaining a legacy GitHub repo now and there is a lot of abandoned PR into old branches. For example, I work in the v3.5 branch now, and PRs are for 3.3 and older.
How can I effectively merge them into my new branch if they target older ones?
In case it's important, I'm sure there will be no conflicts.
I found some old questions about similar things, but I can't find any info on how to do it via GitHub. Is there still no functionality on that? Do I have to manually do it via git?
To do that go to your repository's home page, click on branches, and change the default branch from master into something else, in my case "dev". After that, whenever someone creates a pull request the merge button will automatically merge the request into "dev" rather than master.
Create a pull request Go to the Branches tab on a Git repository page. Click Create. Select the source branch which is wanted to be merged. Select the target branch to which you want the changes to be merged.
To merge branches locally, use git checkout to switch to the branch you want to merge into. This branch is typically the main branch. Next, use git merge and specify the name of the other branch to bring into this branch. This example merges the jeff/feature1 branch into the main branch.
On the github.com pull-request page there is a link to "command line instructions". If you like to do it manually the steps are:
A little bit more searching found this page about renaming branch on github website. It suggests:
All of the pull requests are saved here
pull/ID/head
You can check out s pull request locally by
git fetch REMOTENAME pull/ID/head:BRANCHNAME
git checkout BRANCHNAME
if you want all pulls you can add to the fetch ref
This is a read only address. Is you can't push back to it up update the pull request
Remote name is the local git name for the remote
These are shown by git remote -v
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With