ton.yeung ton.yeung - 2 months ago 6
Git Question

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.

Answer

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.

Comments