Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

default branch for pull request

Tags:

github

My company uses github. When I want to do a pull request I need to make my PR from my fork to the main repo into the staging branch. By default my PRs point to the master branch, so for every pull request I have to change which branch I'm merging into. I know that you can set the default branch in github. I want the default branch to remain master, but I want my pull requests to point to staging by default. Is that possible?

In the image below I don't want to have to change base: master to base: staging every time. The bigger pain is when I forget to change it to staging. enter image description here

like image 973
ajon Avatar asked Jun 09 '17 21:06

ajon


People also ask

Do you need a branch for a pull request?

Pull requests can be used in conjunction with the Feature Branch Workflow, the Gitflow Workflow, or the Forking Workflow. But a pull request requires either two distinct branches or two distinct repositories, so they will not work with the Centralized Workflow.

What is the head branch of a pull request?

Head Branch: The "Head Branch" is the branch that contains the changes you want to integrate. Title: A short title that describes what this Pull Request is about. Description: An (optional) description text that helps your colleagues learn more about the Pull Request.

Can I change branch of a pull request?

In the "Pull Requests" list, click the pull request you'd like to modify. Next to the pull request's title, click Edit. In the base branch drop-down menu, select the base branch you'd like to compare changes against. Read the information about changing the base branch and click Change base.


1 Answers

Go to settings page, branches, ... and select the default branch.

enter image description here

like image 144
sensorario Avatar answered Oct 16 '22 10:10

sensorario