0

When in magit-status and having files in the "Unstaged changes" list I always could go to one of these files and press x to run magit-reset-quickly revert the changes on this file.

But now it does not work anymore. When I press x or run the commandy with M-x magit asks with "Reset master to:" and offers branches. But after I select a branch, nothing happens. The file is not reverted.

This is in all my repos and my config is this:

(use-package magit
  :straight t)

So what could be the problem? Or how can I debug this?

1 Answer 1

1

"Reset" and "reverse" do not refer to the same action.

  • Commits are reset using git reset .... This changes what HEAD points at. Some variants additionally reset the files in the working tree.

  • Individual files or hunks are applied or reversed. Reverting just means doing the opposite of what the patch says, i.e., remove + lines and add - lines.

In Magit x is used for resetting, a for applying, and v for reversing.

This is documented in https://magit.vc/manual/magit/Staging-and-Unstaging.html, https://magit.vc/manual/magit/Applying.html and https://magit.vc/manual/magit/Resetting.html.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.