How do I use Git Flow to make pull requests?

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

This widget could not be displayed.
Timothy Chin Community Champion Jun 12, 2014

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

You can manage branch permissions in Bitbucket.

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

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

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

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.

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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published an hour ago in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

19 views 0 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you