jesseduffield / jesseduffield/lazygit

When local branch diverges from the remote and you're about to force push, the warning should prompt the user enter some text instead of just pressing enter.

Open
#3,468 8 comments 7 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.**
When the local branch has diverged from the remote and you're about to force push, there is a super useful warning that says `your branch has diverged from the remote branch, Press to cancel, or to force push.` Unfortunately, I ended up pressing `enter` out of habit too many times because it's just muscle memory at this point. We could avoid so many accidental force pushes if we had prompted to user the enter a word instead.

**Describe the solution you'd like**
The pop-up could be changed as `your branch has diverged from the remote branch, Press to cancel, or type "force" to force push.` It can be another word, or it could be something else that prevents the user from just pressing `enter` out of habit.

**Additional context**
Many large projects employ this tactic because it's too easy to press buttons without reading what they do. For example, when you're changing the visibility of a repo on Github, they ask you to type the name of the repo in addition to the warning pop-up. This ensures people don't just press `enter` out of habit without even reading what the pop-up says.

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.