jesseduffield / lazygit

simple terminal UI for git commands
MIT License
48.13k stars 1.73k forks source link

Add confirmation before reset --hard if there are local changes #3709

Open abaza738 opened 6 days ago

abaza738 commented 6 days ago

Description

When having local changes and performing git reset --hard, it would be beneficial for the developer to warn for local uncommitted changes. I speak with tears in my eyes after I lost all my changes yesterday. I understand that it is my fault, and I am not blaming lazygit.

Proposed solution

A confirmation popup with the option of auto-stashing local changes before performing git reset --hard.

noahfraiture commented 4 days ago

Hello, I opened a PR about that issue but there seems to not be easily doable because of the way things are done. More explication here https://github.com/jesseduffield/lazygit/pull/3714