jesseduffield / jesseduffield/lazygit

Avoid accidental force-pushing related incidents

Open
#4,649 9 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
82.4k
Forks
3k
Avg merge
2d 18h
Merged PRs (30d)
19

Description

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

I've just accidentally erased a few commits today because my `enter` keypress auto-repeated, confirming the force-push.

**Describe the solution you'd like**

I would like to avoid these kinds of incidents, here's my ideal feature:

When requesting confirmation for force-pushing, `enter` will *cancel* the operation by default.

The confirmation window will have two options "cancel" (selected by default) and "confirm". You'll have to use the arrow key to manually select the confirm option before pressing `enter` in order to force-push.

I feel like this is a good compromise:
- doesn't get in your way
- prevents catastrophic mistakes
- only requires 1-2 keypress
- doesn't require fiddling with the config.

**Describe alternatives you've considered**

Disabling force-pushing in the config, but I do have actual reasons to use it so I'd rather not have to.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.