SuperBo / fugit2.nvim

Neovim git GUI powered by libgit2
MIT License
352 stars 7 forks source link

feature: revert a change #29

Closed sboesebeck closed 4 months ago

sboesebeck commented 4 months ago

Did you check the docs?

Is your feature request related to a problem? Please describe.

not sure, If I read that somewhere (reddit?), but it would be great if there was a way to revert a change in the Fugit2-Mainview. Probably similar again to lazygit - in this case it might be better to maybe use the DEL-Key, to undo a change?

Describe the solution you'd like

It would be great, when opening Fugit2 and seeing all the changes, when highlighting one of those changes, to be able to revert it by hitting a key. Also doing the same on a directory should do that for all changes in that file. It would probably be best, if there was some kind of Confirmation dialog like "Do your really want to revert the changes bla bla bla"...

Describe alternatives you've considered

not sure, I don't think there is any

Additional context

No response

SuperBo commented 4 months ago

Hello @sboesebeck, by deleting changes, do you mean discarding all the changes and return the file to the previous version in git?

Check this issue https://github.com/SuperBo/fugit2.nvim/issues/11.

I assigned "x" and "D" key to this function (the vim way to delete).

SuperBo commented 4 months ago

Hello @sboesebeck, just a quick follow up. Could you confirm https://github.com/SuperBo/fugit2.nvim/issues/11 is the same as what you asking for?

sboesebeck commented 4 months ago

yes, it is. Thanks. Need to have a closer look.