Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Proper way to use Gitflow with pull requests

I would like to adopt the git-flow tool inside my team.

The problem is that "git flow feature finish" merges the branches locally. And I want to create a pull request instead. Thus, the merge will happen in the origin.

So, what is the right way to use the git-flow tool in teams that also work with pull requests?

Tried to google it but could not find something meaningful.

like image 500
utinome Avatar asked Apr 16 '19 11:04

utinome


People also ask

Could you explain the Gitflow workflow?

The Gitflow Workflow defines a strict branching model designed around the project release. This workflow doesn't add any new concepts or commands beyond what's required for the Feature Branch Workflow. Instead, it assigns very specific roles to different branches and defines how and when they should interact.


1 Answers

You can just use the git flow feature publish <name>this will publish your feature branch to your origin (like Bitbucket). Then you can create the pull request there and merge it into develop. After that is done, you need to manually delete the local feature branch.

The only command you can not use is git flow feature finish <name>. This works fairly well and you can still use most of the git flow helpers.

The same goes for releases. I found this article helpfull: https://blog.axosoft.com/pull-requests-gitflow/

As well as https://community.atlassian.com/t5/Bitbucket-questions/git-flow-feature-finish-and-pull-request/qaq-p/347877

Hope this helps a little. There is just not the one perfect solution to this problem.

like image 188
PWFraley Avatar answered Sep 23 '22 00:09

PWFraley