jesseduffield / jesseduffield/lazygit
Make force pushes more difficult
- 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.**
Today I hit 'P' to push; origin/master had new commits; I accidentally hit enter and LG force pushed, causing me a bunch of trouble to restore/obtain the lost commits since I didn't have them locally.
**Describe the solution you'd like**
Force pushes are sometimes needed, so I don't want to ban them completely at the server level, but at the same time they happen so rarely and can be damaging enough that LG should not allow one to force push simply by accidentally hitting 'enter' one a dialog pops up.
Instead, the ideal behavior would be that LG pops up a box and the user is required to hit 'y' in order to force push; if they just hit enter then it defaults to cancelling the push. Or, it could open another box to confirm.
This should not be considered an inconvenience given how rare force pushes are. It is very easy to unconsciously hit enter when a box opens up; under no circumstances should LG do something that is potentially damaging without getting a clear confirmation from the user.
Contributor guide
Assessment
This issue has not been assessed yet.