Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
Right now, when creating a repository from a template, you can only copy over the default branch. It would be nice to be able to initialise a repository with multiple branches using templates.
There are a few different approaches to this that could be taken:
Allowing branches from templates to be copied to repositories at any time, with any name on the target. The multiple branches would be stored as separate template repos.
Allow copying multiple branches from a single template repository when creating a repository from a template.
Allow specifying additional branches to be copied over in .gitea/template.
A few use cases:
Repositories might by default have separate dev and prod branches with different details in them to specify different deployment targets, and a template would want to encode this
Repositories might separate out branches for documentation or software packaging from the base project, while still keeping them in the same repo
If adding templates as branches after repos are created is allowed, then when there is an update to a template it could be added as an extra branch so that a user could try and merge the changes together using git's built-in features.
Screenshots
Current view when choosing a template for a new repository.
Right now, the list of checkboxes seems a bit unsustainable if multiple options are to be presented. For one, with this current layout, it seems that the only feasible option would be to add another checkbox for "copy other branches," without anything else. Perhaps this layout should be updated as well.
Lack of this feature leads to tedious clicking every time a new repo is being created. Obviously it can be automated, but marking one checkbox would be easier.
Description
Right now, when creating a repository from a template, you can only copy over the default branch. It would be nice to be able to initialise a repository with multiple branches using templates.
There are a few different approaches to this that could be taken:
.gitea/template
.A few use cases:
dev
andprod
branches with different details in them to specify different deployment targets, and a template would want to encode thisScreenshots
Current view when choosing a template for a new repository.
Right now, the list of checkboxes seems a bit unsustainable if multiple options are to be presented. For one, with this current layout, it seems that the only feasible option would be to add another checkbox for "copy other branches," without anything else. Perhaps this layout should be updated as well.