• Icon: Suggestion Suggestion
    • Resolution: Done
    • None
    • Git Hosting
    • None
    • We collect Bitbucket feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      Ideally a mechanism for automatically managing repository issue and release branches using the Git Flow model, with branch creation and permissions management in Stash, and the ability to automatically create a Pull Request (See feature request STASH-2482) when work on the issue is complete.

          Form Name

            [BSERV-2491] Add Git Flow (branching) support

            Hi everyone,

            Thanks to everyone for voting and commenting on this suggestion. Your input in the comments helps us understand how this affects you and what you're hoping to accomplish with Bitbucket Server.

            As we've made a number of improvements to Bitbucket Server to help support a GitFlow model, including the branching model, automatic branch merges and branch permissions, we've decided to close this issue for now. If you have a specific suggestion related to GitFlow support, please raise a new issue outlining the specific feature and your use case that requires it.

            Product feedback is collected from a number of different sources and is evaluated when planning the product roadmap. You can learn more about our process here.

            Norman Ma

            Product Manager - Bitbucket Server

            Norman Ma (Inactive) added a comment - Hi everyone, Thanks to everyone for voting and commenting on this suggestion. Your input in the comments helps us understand how this affects you and what you're hoping to accomplish with Bitbucket Server. As we've made a number of improvements to Bitbucket Server to help support a GitFlow model, including the branching model, automatic branch merges and branch permissions, we've decided to close this issue for now. If you have a specific suggestion related to GitFlow support, please raise a new issue outlining the specific feature and your use case that requires it. Product feedback is collected from a number of different sources and is evaluated when planning the product roadmap. You can learn more about our process here . Norman Ma Product Manager - Bitbucket Server

            mbneto1559721656, yes you can set up a branch model with automatic merges for this. For details, see our documentation

            Roger Barnes (Inactive) added a comment - mbneto1559721656 , yes you can set up a branch model with automatic merges for this. For details, see our documentation

            Hi, I was hoping I could use the gitflow model with stash without having to manually merge hotfixes and release branches back to develop. Is there any way to do this from stash?

            Mario Bittencourt added a comment - Hi, I was hoping I could use the gitflow model with stash without having to manually merge hotfixes and release branches back to develop. Is there any way to do this from stash?

            From STASH-5525, a use case to consider:
            "Stash supports a variety of branching models, gitflow being one of them. In gitflow a release branch is a short lived staging branch for a yet to be released version. In this situation it may make sense to merge production into the release branch automatically after merging a hotfix into production.
            Users currently have to merge hotfix changes from production to their release branch(es) as a separate action."

            Roger Barnes (Inactive) added a comment - From STASH-5525 , a use case to consider: "Stash supports a variety of branching models, gitflow being one of them. In gitflow a release branch is a short lived staging branch for a yet to be released version. In this situation it may make sense to merge production into the release branch automatically after merging a hotfix into production. Users currently have to merge hotfix changes from production to their release branch(es) as a separate action."

            One important point around gitflow-feature branches is the fact, that they should have dedicated version strings. If we talk about Maven, that means the version within the pom.xml is changed to something else, to still allow the build artifacts to be deployed to a Maven repository without overwriting the other feature-branch or develop-branch. In maven-jgitflow-plugin this is achieved with feature-start with the additional parameter enableFeatureVersions. When such a feature branch is merged back to develop, it should not merge the version change though. It would be great, if Stash would add support for

            • changing versions when creating feature branches
            • take care that the changed versions are not merged back to develop (in case a pull request is closed).

            Konrad Windszus added a comment - One important point around gitflow-feature branches is the fact, that they should have dedicated version strings. If we talk about Maven, that means the version within the pom.xml is changed to something else, to still allow the build artifacts to be deployed to a Maven repository without overwriting the other feature-branch or develop-branch. In maven-jgitflow-plugin this is achieved with feature-start with the additional parameter enableFeatureVersions. When such a feature branch is merged back to develop, it should not merge the version change though. It would be great, if Stash would add support for changing versions when creating feature branches take care that the changed versions are not merged back to develop (in case a pull request is closed).

            As of Stash 2.8 simple gitflow support can be achieved using the branching model. As explained here the branching model can be configured to match git flow.

            It would be great to understand on top of what was implemented in 2.8, what functionality would be useful for a development team using gitflow

            jhinch (Atlassian) added a comment - As of Stash 2.8 simple gitflow support can be achieved using the branching model. As explained here the branching model can be configured to match git flow. It would be great to understand on top of what was implemented in 2.8, what functionality would be useful for a development team using gitflow

            Here are some other missing features that come to my mind:

            Allow to create complex merge rules, e.g. ...

            A click on Merge of a git flow hotfix/release pull request merges the hotfix/release branch (created locally with git flow hotfix start <version> or git flow release start <version>) into master, tags the current HEAD in master with a customizable message (like Version ${stash.gitflow.version} released.), and merges the hotfix branch into develop.

            Basically, I'd like to use Stash to automate the hotfix and release process.

            More information:

            Alexander Müller added a comment - Here are some other missing features that come to my mind: Allow to create complex merge rules, e.g. ... A click on Merge of a git flow hotfix/release pull request merges the hotfix/release branch (created locally with git flow hotfix start <version> or git flow release start <version> ) into master, tags the current HEAD in master with a customizable message (like Version ${stash.gitflow.version} released. ), and merges the hotfix branch into develop. Basically, I'd like to use Stash to automate the hotfix and release process. More information: The hotfix process (a release works similar): http://nvie.com/img/2010/01/hotfix-branches1.png The big picture: http://nvie.com/img/2009/12/Screen-shot-2009-12-24-at-11.32.03.png git flow explained: http://nvie.com/posts/a-successful-git-branching-model/

            Ali added a comment - - edited

            @Mark,

            The request is indeed a jumble of related issues.

            With regard to what is missing in terms of git flow integration, a couple of points come to mind:

            • Allow only specific users/groups to push a new branch to a repository.
            • Disallow creation of branches based on customisable naming criteria (currently manually adding git hooks to repositories for this)
            • Associate an issue/feature branch with its corresponding issue in Jira/other issue tracker (similar to how Bamboo 4.2+ can)
            • Graphical hierarchical overview of commits per repository branches per repository in Stash.

            I agree that Jira integration is a separate request, updating the title/description accordingly.

            Regards.

            Ali added a comment - - edited @Mark, The request is indeed a jumble of related issues. With regard to what is missing in terms of git flow integration, a couple of points come to mind: Allow only specific users/groups to push a new branch to a repository. Disallow creation of branches based on customisable naming criteria (currently manually adding git hooks to repositories for this) Associate an issue/feature branch with its corresponding issue in Jira/other issue tracker (similar to how Bamboo 4.2+ can) Graphical hierarchical overview of commits per repository branches per repository in Stash. I agree that Jira integration is a separate request, updating the title/description accordingly. Regards.

            Hi Ali:

            I'm interested in understand what you think the requirements are, as we are looking into using "git flow" with Stash as well.

            Your request looks like a jumble of related requests that may or may not be "git flow" specific. I'm thinking if you can describe the requirements and use cases more - we might also have these requirements, and we can describe these to Atlassian together?

            I guess the real question is - what is Stash missing in terms of "git flow" integration?

            I think permissions is a separate request from this - although it is possible that if branch-specific permissions existed, than the standard "git flow" naming conventions for branches should require certain branch-specific permissions to be set by default for branches with particular names? Also, perhaps disallow the creation of branches that are named a certain way?

            I think JIRA integration is a separate request from this.

            Mark Mielke added a comment - Hi Ali: I'm interested in understand what you think the requirements are, as we are looking into using "git flow" with Stash as well. Your request looks like a jumble of related requests that may or may not be "git flow" specific. I'm thinking if you can describe the requirements and use cases more - we might also have these requirements, and we can describe these to Atlassian together? I guess the real question is - what is Stash missing in terms of "git flow" integration? I think permissions is a separate request from this - although it is possible that if branch-specific permissions existed, than the standard "git flow" naming conventions for branches should require certain branch-specific permissions to be set by default for branches with particular names? Also, perhaps disallow the creation of branches that are named a certain way? I think JIRA integration is a separate request from this.

            Ali added a comment -

            Just came across the Git Flow integration in Sourcetree. I believe that is the functionality which this issue is attempting to address. Updating the issue title and description, will revert if there are any objections.

            Ali added a comment - Just came across the Git Flow integration in Sourcetree . I believe that is the functionality which this issue is attempting to address. Updating the issue title and description, will revert if there are any objections.

              Unassigned Unassigned
              4bb57f013684 Ali
              Votes:
              86 Vote for this issue
              Watchers:
              68 Start watching this issue

                Created:
                Updated:
                Resolved: