Skip to content

Option to disable force push confirmation popup #5966

Description

@ilan-schemoul

Is your feature request related to a problem? Please describe.

In gitlab you work in your own branch, you cannot push in main (never seen a project where main/master is not protected), so force push is the normal flow (as you force push to your own branch and do a merge request).
I very often forget to press enter for the force push confirmation prompt, which makes the pipeline not triggered, not getting review etc. (a big lose of time)

Describe the solution you'd like

Option to disable force push confirmation prompt.
Ideally the option takes a condition (so I can check if I am in gitlab or not).
The condition can be maybe something like "repository: [gitlab, gtihub]" (if upstream match one or the other then the condition is true) or it can be a simple shell command (more tedious but more flexible and easier to implement).
But I think a simple boolean (true/false) would work too.

To be clear if condition is true (or evaluated to be true if you write a condition), there is no confirmation prompt, it just always force push --force-with-lease (also maybe force vs force-with-lease is configurable)

Describe alternatives you've considered

Making the prompt more obvious, my eyes look at the branch on the left and something appear on the center (on external monitor I can miss it) and has nothing (no color/shape) to catch my eyes.

Additional context

I volunteer to implement it if I have the greenlight (if it's not too hard to implement. So I would prefer implementing the simple true/false option if it's easier for example).

Yeah I did:
Overriding P or creating custom command is not great because the UI is not the same (not "pushing ..." in the branch section) and worst of all it doesn't prompt when you have no remote set. If you do normal P it allows you to select the remote if none is set.

Metadata

Metadata

Assignees

No one assigned

    标签

    enhancement新建 feature or request

    项目

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions