It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How do I use Git Flow to make pull requests?

oscar albrecht Jun 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

0 votes
Timothy Chin Community Leader Jun 12, 2014

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

You can manage branch permissions in Bitbucket.

oscar albrecht Jun 12, 2014

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

Jek B Choo Jul 27, 2015

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

oscar albrecht Jul 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 Jul 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 Jul 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
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder

...ipe.sh :  #!/bin/bash source "$(dirname "$0")/common.sh" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

3,038 views 1 20
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you