Ensure line feed setting not working
Followed by 2 people
Answered
In preferences -> editor -> general I checked the Ensure line feed at file end on save. Locally, I see an extra line in my file, but when I push to GitHub, the linefeed is gone.
I think this behaviour started since I installed Webstorm last week. AFAIK I installed Webstorm without importing settings. As a sanity check, I also checked the Ensure line feed setting in Webstorm. That didn't work.
In the end I decided to add a .editorconfig to the root of my project, whith the newline feed setting = true.
None of this helped; the extra line doesn't make it to GitHub.
How can I solve this? Or at least, what can I do to trace where the problem lives?
Please sign in to leave a comment.
NB I also tried editing in Vim, pushing from the command line, to another project on GH. Same problem: newline removed.
How do you know there is no newline? Maybe you have some custom pre-commit git hook that removes the linefeeds?
Anyway, the issue doesn't seem to be related to IntelliJ IDEA as you have the same problem in Vim.
You can try asking at http://stackoverflow.com/.