IntelliJ has a nice feature in the overview of the staged area, where you can make changes to the files in the staging area while having the diff overview. In the Magit overview of staged changes I would also like to make changes. Is this possible?

How can I make changes to files in a view where I see the diff?

1 Answer 1


Magit does not currently allow editing diffs directly. I am considering to allow this in v3, but this would require significant and expensive changes, so I might end up not doing it.

Meanwhile you can very easily jump to the correct location in the file-visiting buffer by just pressing RET. (It might be nice if diff-hl-mode were enabled in that buffer.) Or you could give Magit's Ediff integration a try. To do so press e.

  • maybe the ediff-stage command is worth mentioning here? It's not precisely editing a diff like @erwin asked, but it does show differences while editing.
    – npostavs
    Sep 1, 2016 at 13:16
  • @npostavs You mean magit-ediff-stage I think.
    – JeanPierre
    Sep 1, 2016 at 13:52
  • Or just RET to visit the file at the correct position.
    – tarsius
    Sep 1, 2016 at 13:54
  • Awesome to get a response from the maintainer :). I will use RET for now. Thanks. Sep 1, 2016 at 14:18
  • MaintainerS, npostavs is a maintainer too. And you are welcome.
    – tarsius
    Sep 1, 2016 at 14:19

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.