Currently, pressing Enter performs a git reset --hard, which is totally destructive if you have uncommitted changes you forgot about.
We should add alternative keybindings for safer operations:
- Press
s for git reset --soft (keeps working tree intact)
- Press
c for git checkout <hash> (puts you in a detached HEAD state to look around)
Implementation thoughts:
- Should be pretty straightforward by duplicating the current
Command::new("git") logic and mapping it to the new Crossterm keys in src/main.rs.
- Need to update the footer/help text to display these options.
Currently, pressing
Enterperforms agit reset --hard, which is totally destructive if you have uncommitted changes you forgot about.We should add alternative keybindings for safer operations:
sforgit reset --soft(keeps working tree intact)cforgit checkout <hash>(puts you in a detached HEAD state to look around)Implementation thoughts:
Command::new("git")logic and mapping it to the new Crossterm keys insrc/main.rs.