Hey,

in https://github.com/mbunkus/magit/tree/kill-commit-by-resetting-hard I've implemented "git reset --hard". It works by overlaying magit-discard-item (bound to "k") in both status and log mode. It will reset to the parent of the commit at point. It will also ask the user if he really wants to "reset hard to <sha1-short> <commit subject>".

So far magit-discard-item did not do anything on a commit line.

I'm not certain about using "k" for this, and Phil has the same doubts. I suggested using "K" as the more destructive version, and Phil suggested overlaying "X" as "X" already uses "git reset". However, I'm not certain changing "X" that way would be beneficial as until now it has done the same thing no matter where point was.

So: anyone else have an idea or opinion or preference?

Regards,
mo

Reply via email to