Since Rest R Ant application is an open source project, we need to make sure git takes care of normalizing line endings. Here is a link that explains why we need to do this.
I added a .gitattributes file under root folder of project to instruct git to handle line endings during checkout and commit operations. Here is the content of my .gitattributes file:
My entries in .gitattributes is telling git to do the following:
- On all text files, update end of line with lf (line feed) like unix way.
- On all .bat and .cmd files replace eol with crlf (carriage return line feed) the windows way.
- All jar files, png, pdf files are considered binary, which means they wont
be modified during checkout and commit operations.
If .gitattributes file is added during middle of a project, run the following command to correct all end of line on all files.
- git add –renormalize .
–renormalize option applies “clean” process freshly to all tracked files to forcibly add them again to the index.