Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-3614

Support creating a project/repository from a predefined "blueprint".

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • None
    • Repositories
    • Standalone
    • 24
    • 13
    • 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.

      In almost all companies where I worked, we had some sort of blueprint that a project in source control should adhere to. For example, when creating a Visual Studio 2010 project, I have to

      • create .gitignore to exclude Visual Studio files and folders (e.g. bin, obj)
      • create folders (src, lib)
      • create files (e.g. build.proj for build automation)

      And so much more. For other types of projects, be it C/C++, Java, Rails or Objective-C, the steps will be different. However, organisations typically "standardise" the project layout for each type of project.

      One way this could work is to designate a repository (let's call it "Visual Studio Solution") as a blueprint. Since its just a git repository, I can commit the standard folder structure I desire. I can also define basic permissions. Then when I create a Stash repository, I can specify "Visual Studio Solution" as the blueprint for my new repository. The expectation would be for Stash to create a repository that is almost identical to "Visual Studio Solution".

      More often than not however, I may want to customise what should happen. If my "Visual Studio Solution" has a file in the "src" folder called "MySolution.sln", I'd like to be able to rename it appropriately. This may require that I commit a manifest file to my blueprint project. The manifest may describe variables that should be entered, files that should be renamed and so forth. So when I create a subsequent project, Stash will ask me to enter some variables, which can be used to rename files. In addition, I may want to replace text within files (such as build.proj with the solution).

      The idea is to promote a consistent structure within the repository. It may shave an hour off the time it takes to create a repository that conforms to organisation standards.

      In essence, something similar to a Confluence blueprint.

          Form Name

            [BSERV-3614] Support creating a project/repository from a predefined "blueprint".

            You might want to try our app Repository Templates for Bitbucket.

            You can configure a repository as a template/blueprint, and when you create new repositories,
            just choose from a defined template and the app will create a new repository with the
            template's repo content and settings.

            This is best explained in this video tutorial.

            Try it out and Let us know what you think.

            Michael Rüegg [Mibex Software] added a comment - You might want to try our app Repository Templates for Bitbucket . You can configure a repository as a template/blueprint, and when you create new repositories, just choose from a defined template and the app will create a new repository with the template's repo content and settings. This is best explained in this video tutorial . Try it out and Let us know what you think.

            Along the lines of what was mentioned above, I think that having the ability to create a project and have it initialized with a configurable set of branches would go a long way.  I realize that this would require an initial commit.  Maybe there could be a configurable README.md that gets created as part of the process?

            David Scheck added a comment - Along the lines of what was mentioned above, I think that having the ability to create a project and have it initialized with a configurable set of branches would go a long way.  I realize that this would require an initial commit.  Maybe there could be a configurable README.md that gets created as part of the process?

            Another use case:

            Our dev model is to use feature branches, which means that the first commit in a new repo will be on a feature branch. Since stash doesn't allow a new branch to be created in an empty repo (STASH-4155, closed as a duplicate of this), the initial branch has to be created on the client and pushed to the server. This is a bit annoying, because its a different process for the very first commit vs the others.

            Bradley Baetz added a comment - Another use case: Our dev model is to use feature branches, which means that the first commit in a new repo will be on a feature branch. Since stash doesn't allow a new branch to be created in an empty repo ( STASH-4155 , closed as a duplicate of this), the initial branch has to be created on the client and pushed to the server. This is a bit annoying, because its a different process for the very first commit vs the others.

            jason-kc added a comment - - edited

            This "blueprint" or template would be useful, especially if we can pre-define a set of standard branches with proper branch settings for all newly created repositories. I believe that people using Stash / Git must have a branch model to follow and it should generally apply to all the repositories they created. With this new feature, we could save a lot of time manually creating those branches with initial commits and setting up branch model and Pull requests setting etc when creating a new repo. This could be very useful to create Stash repositories.

            jason-kc added a comment - - edited This "blueprint" or template would be useful, especially if we can pre-define a set of standard branches with proper branch settings for all newly created repositories. I believe that people using Stash / Git must have a branch model to follow and it should generally apply to all the repositories they created. With this new feature, we could save a lot of time manually creating those branches with initial commits and setting up branch model and Pull requests setting etc when creating a new repo. This could be very useful to create Stash repositories.

            Yes agreed. I like how we are venturing into areas where we are ahead of the game.

            Stefan Saasen (Inactive) added a comment - Yes agreed. I like how we are venturing into areas where we are ahead of the game.

              Unassigned Unassigned
              bcd96b272979 bloudraak
              Votes:
              64 Vote for this issue
              Watchers:
              43 Start watching this issue

                Created:
                Updated: