3

When a file (like .emacs for example) is modified in a Git repository, if I want to git pull git refuses to do so because I have a modified file. Git proposes to remove the modification by doing

git checkout -- .emacs

But how do you do that using Magit ? I have seen that -- is the equivalent of --ignore-skip-worktree-bits but I don't see this option in Magit.

1
  • -- just separates options from file names.
    – choroba
    Commented Sep 24, 2016 at 12:17

1 Answer 1

6

Either stash the modifications with z or kill the modifications with k.

The latter, with point at .emacs, is the equivalent of checking out the latest/unmodified revision of that file. You can also apply it to the entire list of modified files.

0

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.