No newline at end of file

后端 未结 12 2251

When doing a git diff it says \"No newline at end of file\".

Ok, there is no newline at end of file. What\'s the big deal?

What\'s the

12条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-27 09:29

    Your original file probably had no newline character.

    However, some editors like gedit in linux silently adds newline at end of file. You cannot get rid of this message while using this kind of editors.

    What I tried to overcome this issue is to open file with visual studio code editor

    This editor clearly shows the last line and you can delete the line as you wish.

提交回复
热议问题