git-diff to ignore ^M In a project(to me happened in so win, even on diferents virtual machines :S ), something appear this caracters ^M in our scripts, for example java https://help.github.com/en/github/using-git/configuring-git-to-handle-line-endings Github suggest use the \n for end line, that you should make sure to only use \n as a newline character in git-handled repos. There's an option to auto-convert:
$ git config --global core.autocrlf true