Replace special charater ^M by \r as they are not supported by git.