Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-17593

Unable to create a branch with branch types if its prefix is occupied

    XMLWordPrintable

    Details

    • Feedback Policy:

      Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Description

      Unable to create a branch with branch types if its prefix is occupied

      Summary

      Due to Git spec, it's unable to create a branch if its prefix is preoccupied as other branch's name and vice versa.
      This also possibly happens to branching model.

      Steps to Reproduce

      • Create a branch named "feature"
      • Enable "Feature" in branching model configuration
      • Try creating a branch prefixed "feature/"

      Expected Results

      The error message should clarify why branch creation fails like below or guide how to apply the workaround.

      fatal: cannot lock ref 'refs/heads/release/20181119': 'refs/heads/release' exists; cannot create 'refs/heads/release/20181119'
      

      Actual Results

      The below error message is shown:

      We couldn't create a branch

      If this keeps happening, contact support.

      Notes

      The error can occur the other way round:

      • Enable "Release" in branching model configuration
      • Create a branch prefixed "release/"
      • Try creating a branch named "release"

      In this case, the branch creation page better to make users unable to specify reserved names (feature, bugfix, hotfix, release).

      Workaround

      Rename or delete the pre-existing branch which blocks prefix.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            kyamamoto@atlassian.com K. Yamamoto (he-his)
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: