Skip to content

Local branch protection #113

@laeubi

Description

@laeubi

Description

It would be good to allow some kind of local branch protection, e.g I want prevent the main branch is modified in any way in my local clone through commiting or change ref and so on.

Motivation

Once in a while I accidentally mess up my local clone because:

  1. Create a small enhancement
  2. Commit the change
  3. Because I not cautious enough I'm still on main branch (and now I need to reset)
  4. Even worse I might push the change (and now have updated my refs in the config)

To prevent his it would be cool to have some kind of local "branch protection" that:

  • Gives an error or even better ask me to create a branch first if I try to commit to such protected branch
  • As an alternative maybe disable all actions like it is done during rebase when there are conflicts

Alternatives considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions