XML and End of line management #77438
-
|
Hello to all! My work is mostly to "copy&past" from existing files, adapting them to my needings. GitHub contains the reference input files, which are downloaded by the software in case of uptades. My probem is related to End of Line character: the downloaded files uses UNIX EOL character, while I need Windows (CRLF) EOL. the standard xml code to manage is like the following: which is printed this way: [text text text] Can someone help me to solve this problem? thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
|
Greetings Caiapha, it's nice to have you here buddy. 👋🏼 You can use a
This will tell Git to automatically manage line endings for all text files, and to use CRLF line endings for XML files, when you checkout an XML file, Git converts the line endings to CRLF, when you commit the file, Git converts the line endings back to LF. One more thing, if you already have XML files in your repository, you might need to re-normalize them by running the commands: Let me know if this solved the issues; best of luck on the journey! 🍺 🍀 |
Beta Was this translation helpful? Give feedback.
-
|
dear Bejzik8, thanks for the fast reply. 1 I deleted all the files from my repository Unfortunately it failed. Regarding the "renormalize", I have no Idea how to run that codes. Is there any shell, command line? |
Beta Was this translation helpful? Give feedback.
-
|
Could you guys help me get two answer accepted? |
Beta Was this translation helpful? Give feedback.
SOLVED! The problem was probably related to the GIT's interpretation of the "text" areas. In practice, what I need to consider consider as text was not interpreted as text, therefore the eol was not changed.
I deleted the "text" word from "*.xml text eol=crlf" command line in .gitattribute and the file has been setted as windows style, solving the problem (for me).
I don't know if this is a "deprecated" solution, but it works to me.
Anyway, thanks for the support!