Separate default branches for MRs and for tags
Problem to solve
We use a git flow-like workflow, with two permanent branches, master and dev. Feature branches (which are ~90% of branches) get merged into dev, and to facilitate that we have our default branch set to dev. When we have a hotfix, the MR goes into master, and we then tag master with a patch release and trigger a CI build/deploy to prod. Because the New Tag page ( /namespace/projects/tags/new ) defaults to using the default branch, on several occasions we've accidentally tagged dev with the patch release instead of master.
Further details
(Include use cases, benefits, and/or goals)
Proposal
In the simplest implementation, the repository settings page would allow you to specify multiple default branches - one for MRs, and one for tags.
What does success look like, and how can we measure that?
(If no way to measure success, link to an issue that will implement a way to measure this)
Links / references
- In a twitter thread, Gitlab brought up https://gitlab.com/gitlab-org/gitlab-ee/issues/7211 as another example of something that is difficult because of the conflation of HEAD and default branch.