gitui icon indicating copy to clipboard operation
gitui copied to clipboard

Hard reset for modified files

Open ClementNerma opened this issue 3 years ago • 2 comments

Hi there!

I've been using GitUI for a few days and I've been really enjoying it :)

I was wondering if it would be possible to add a "hard reset" shortcut to reset files to what they were at the last commit.

Basically, let's say I have a file, and edit it and commit the changes in commit A. Then I do some edits but want to revert them. This feature would revert the file to the state it was when I made commit A.

Thanks in advance for your answers!

ClementNerma avatar Oct 03 '22 16:10 ClementNerma

You basically want to checkout a specific file to a specific commit ?

extrawurst avatar Oct 04 '22 15:10 extrawurst

You basically want to checkout a specific file to a specific commit ?

No, to the last commit only. This would exactly equivalent to running git checkout <path> for tracked files.

Ideally it could work on directories too (git supports that as well). With a hard confirmation message defaulting to the 'No' option to ensure no data is accidentally lost, this could come very handy.

ClementNerma avatar Oct 04 '22 16:10 ClementNerma

This issue has been automatically marked as stale because it has not had any activity half a year. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 21 '23 11:05 stale[bot]