How do I use Git Flow to make pull requests?

oscar albrecht June 12, 2014

I am setting up our new Bitbucket Repo (we are migrating from TFS). We are using SourceTree as our GUI.

I would like to use SourceTree's Git Flow, which seems to be amazing. I am having only one problem:

-When someone finishes a Feature, I would like to create a Pull Request to my Development branch, instead of merging it automatically.

How do I disable some devs to push to the dev branch?

And how do I make that the Finish Feature makes a Pull Request, instead of a merge?

1 answer

1 vote
Timothy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 12, 2014

How do I disable some devs to push to the dev branch?

You can manage branch permissions in Bitbucket.

oscar albrecht June 12, 2014

Ok, great, but how do I make the git workflow option "Finish Feature" to make a pull request and not a merge?

Like # people like this
Jek B Choo July 27, 2015

I'm hoping for this answer too. Do you have an answer to this?

Like Deleted user likes this
oscar albrecht July 28, 2015

I could not find any way. I removed the right of pushing into the develop and we agreed that they should perform Pull Requests. It worked perfectly

Jek B Choo July 28, 2015

Thanks for your answer. Your answer leads me to a few more questions for clarification. 1. Should one (e.g. Software Developer X) upon finishing a feature use gitflow option "Finish Feature"? 2. If we get Software Developer X to perform a pull request instead of using "Finish Feature", wouldn't this disrupt the opinionated way of using Gitflow to finish a feature? In brief, how are you using Gitflow + Pull Request from start to end? I did the following to test the idea of using Gitflow with Pull Request. To begin my main branch is Master. --> I start a feature branch off develop branch. --> I push Feature Branch to remote origin as Feature Branch. --> I do a Pull Request on Feature Branch. --> I finish a feature branch using Gitflow "Finish Feature", I choose indicate "Delete Branch" after merge. This flow is messing my pushes and commits.

oscar albrecht July 28, 2015

1- No, they should not use Finish Feature. For two reasons: 1- this would work because s/he has no rights to push on develop. (technical reason) 2- We require our code to be reviewed before merging (development flow reason) 2- I never saw any specification on how the merge should be done when reading about gitflow (if you have any resources on that I would be happy to read them). But for us was code review very important, so we added this extra mile to be able perform it. As far as I understand gitflow is the branching schema and development flow. If it has any detailed specification on how the merge should be done I am not aware of it. (And even if it has: I don't think I would jugde it as important, because the best process is the one that works for you ;) ). Your flow looks nice. What do you mean when you write "This flow is messing my pushes and commits." ?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events