search

Home  >  Q&A  >  body text

vim - git diff say "no newline at end of file"

vim save a file without any modify, but git diff say "no newline at end of file"

Scenario:

After submitting the code of my colleague on the windows machine, I pulled it down here (linux) and nothing was modified. When I opened it in vim and saved it, there will be a git diff as shown below:

How to configure to ignore this difference.

仅有的幸福仅有的幸福2794 days ago891

reply all(1)I'll reply

  • 淡淡烟草味

    淡淡烟草味2017-05-02 09:27:32

    http://stackoverflow.com/questions/5813311/no-newline-at-end-of-file

    reply
    0
  • Cancelreply