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?
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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." ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.