Theoretically it is said that when working in a windows machine, people should use core.autocrlf
set to true.
My windows machine git config settings is core.autocrlf=true
However when I clone a gitlab repository I can see that some sh files have their lines finished in \r
.
(I do that by doing cat -A thefile.sh
).
This originates all kinds of problems when I copy these files to a linux environment and try to run them.
For reference I cloned the same gitlab repo in a linux machine (where that configuration is not set) and the sh files have no \r
in them.
My question is, how can I fix this?
Will setting the core.autocrlf
to input and cloning again the repo will help?
When did these \r
get introduced?