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

浏览:51日期:2023-10-08

问题描述

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

情景:

windows机器上同事的代码,提交后,我这边(linux)拉下来,什么都没修过,vim打开再保存,就会有git diff如图:

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

要如何配置才可以忽略这个差异。

问题解答

回答1:

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

相关文章: