•  
      request #13356 Allow to change the default branch
    Infos
    #13356
    Guilhem Bonnefille (CS) (gbonnefille)
    2021-06-16 09:53
    2019-05-02 11:20
    14474
    Details
    Allow to change the default branch

    When using the GitFlow workflow, the most significant branch (for development team) is the develop branch, not master.

    It would be necessary to offer a way to configure the Git plugin to focus on an other branch than master.

    Proposal:

    • In each Git repository settings, in "General settings", there is a drop down to select the default branch (default being current, aka master)
      • Only an existing branch can be selected at this point
      • The selection is not proposed when there are no branches in the repo yet
    • Default branch should be updated in git repo with git symbolic-ref HEAD refs/heads/...
      • ⚠️ The info is not duplicated in the database
    • Tuleap will then refuse to delete default branch
      • Need to deploy pre-receive hook to prevent modification (update of project like permission should be redeploy hooks, to be checked). As the redeploy is costly, we won't force redeploy everywhere so new hooks will be pushed:
        • For all new repositories
        • When a new default branch is set (send the project conf dump event)
        • When permissions are update
    • The default branch info should be added in REST /git/:id representation
    • When repository is displayed without a selected branch, the new default is used.
      • The branch selector displays a default label next to the default branch
    SCM/Git
    10.11
    EL7 (CentOS|RHEL)
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Thomas Gerbet (tgerbet)
    Closed
    2021-06-16
    Attachments
    Empty
    References
    Referencing request #13356

    Follow-ups

    User avatar
    Thomas Gerbet (tgerbet)2021-06-03 10:31

    Development has started.


    • Status changed from Verified to Under implementation
    • Assigned to changed from None to Thomas Gerbet (tgerbet)
    User avatar
    • Original Submission
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar
    • Original Submission
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    • Status changed from New to Verified
    User avatar
    • Original Submission
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar
    • Original Submission
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar
    • Original Submission
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar

    We also would like to vote on that. Just like gitea and github be able to define the default branch, specially to pull.