We are quite new to GIT/Stash but so far it's all going very well. We have out workflow and branching model defined.
Today we enabled the Branching model in Stash, and the expectation is, that Sourcetree/GIT would reject branch names that don't conform to this pattern if developers tried to push them. This doesn't seem to be the case. Developers can create branches without a prefix or with some other prefix. Have I mis-understood something?
Our branching model looks like this:
The branching model in essense is just a model/template to use. It is not enforcable without add ons in Stash (https://developer.atlassian.com/stash/docs/latest/how-tos/responding-to-application-events.html).
The wording by Atlassian suggests that it enforces it..
It's not really doing anything active at all. Infact since switching it on, we havn't really noticed any differences. I guess the change only applies if you create branches from Stash or JIRA. Is this the point of it?
Tim is correct, currently the branch model is not enforced, but it can be by way of add-ons.
For now this means that the current out-of-the-box experience is that people using create branch from within JIRA and Stash will get the benefit of a branch model's guidance, but no one is prevented from naming new branches however they like.
Encouraging a social standard seems to work quite well for many, but I can appreciate that some projects need more restrictive flows (even in a distributed world). We are open to suggestions on where we can take workflow automation and management in the future in a way that works for most teams.
Your branching model is called "Git Flow" is SourceTree. SourceTree will not import the settings from Stash, but the first time a developer hits the "Git Flow" button, they will be asked to enter the same thing.
After the first time, you can the branching model can be enforced IF your devs only create branches with the Git Flow button. Doing so when development is checked out will ask if they are creating a feature, hotfix, or release, and will automatically prepend the selected prefix to whatever name they choose for the new branch. Hitting Git Flow while in a feature, hotfix, or release branch will prompt the user to "finish", which merge that branch into the appropriate other branches (develop for feature, develop and master for hotfix and release).
In the end, we have shown them how easy it is to create the branch directly from JIRA (with the Stash Integration), they now all use that, so the branching naming isn't so much of a big deal anymore.
I'm sure there will always be one smartass that wants to do something different however, like create their branches using GIT CLI.....
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!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot