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.
- Selectively importing other people's pull requests in your own Github fork
- Git: Error creating pull request: Forbidden (HTTP 403)
- Working while waiting for pending PR
- Merge some commits in pull requests in Github
- Ignoring specific files, file types or folders in a pull request diff
- Why do pull requests appear when fetching
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.
3 Solutions collect form web for “Set the develop branch as the default for a pull request”
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.
Instead of using
develop branches, use
Then it is usually good to merge them before tagging a new version, so there is none or only little diversion. I use this schema and usually
master with small delay and merges are mostly fast-forward.
master branch deployable, merge feature branches when they are ready. But since you have
stable branch, new features does not have to be well tested.
The github has their own suggested workflow called github flow, by convention all pull requests default to
master but you can now edit it to any branch you like.