Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set the develop branch as the default for a pull request

I want to make the pull request merge into develop from the feature branch by default.

I'm advocating the use of git flow, so when a pull request is submitted for a feature, the pull request needs to get merged into develop, and not master.

Some of the managers commented that being human, there is a possibility that the team leads could overlook that fact and merge the pull request into master by mistake, causing issues with the release later on.

We want to mitigate the risks of merge hell so this would go a long way in achieving this goal.

Edit: I'm using a fork of gitflow called hubflow(http://datasift.github.com/gitflow/). By default, when a feature branch is created git hf feature start [tik-123] the feature branch is created per spec but also gets pushed up to origin. We want this for collaboration. Once the feature is complete, the dev will go to the feature branch in github and issue a pull request. The team leads will then review the pull request and merge the feature into dev if the feature is slated for release in the sprint.

like image 479
ton.yeung Avatar asked Feb 13 '13 16:02

ton.yeung


People also ask

Should I develop the default branch?

If the develop branch is default, pull requests etc. would default to the correct branch. However, develop might be broken from time to time. If the master branch is default, every visitor would be presented with the code of the latest stable release version.


1 Answers

Alternatively make develop the default branch that everyone sees when visiting the project. The downside is that anyone who clones it will get an unstable branch by default but all pull requests will go to the develop branch by default too.

like image 72
Ian Stapleton Cordasco Avatar answered Oct 24 '22 21:10

Ian Stapleton Cordasco