0

I have changes on one file. After a push, when I go to the commit's view of GitHub, I see this text:

Showing 1 changed file with 16 additions and 16 deletions.

The commit and push is done by NetBeans 8.1.

Could it be something with the line endings?

Misa Lazovic
  • 2,805
  • 10
  • 32
  • 38
Nikolay Traykov
  • 1,537
  • 17
  • 26
  • "Could it be something with the line endings?" Yes, it could be. But we have no way of knowing without more information. Does the file only contain 16 lines? How many lines do you think you've changed? Can you share a link to the file? Does [this](http://stackoverflow.com/a/11509629/354577) help? – ChrisGPT was on strike Nov 30 '15 at 12:04
  • This is the [file](https://github.com/nkostadinov/yii2-user/commit/f8883ecd1ed8180069ecab54fc8c603134a8a424?diff=unified). I just added one empty line at the end. It happens with other [files](https://github.com/nkostadinov/yii2-user/commit/537338f14e17e7cbca540658caf198ee058338c0) as well (SecurityController.php where I added one method). The line endings of Netbeans are LF but I also tried with CRLF. I didn't touch the configurations of git. – Nikolay Traykov Nov 30 '15 at 12:41
  • 1
    Yes, this is a line endings issue. You can see that by [adding another GET parameter `w=1`](https://github.com/nkostadinov/yii2-user/commit/f8883ecd1ed8180069ecab54fc8c603134a8a424?diff=unified&w=1) so GitHub will show you the diff ignoring whitespace changes. Unlike some other users, I don't recommend asking Git to unify line endings for you. Rather, you should pick a line ending style and ask all your developers to use it. Any halfway decent editor on any platform can use any line terminators. – ChrisGPT was on strike Dec 01 '15 at 19:46
  • Thanks a lot for the answer! – Nikolay Traykov Dec 02 '15 at 06:44

0 Answers0