0

I've got multi platform based project, and from time to time, Some common data files that are formatted for one architecture, breaks compilation on the other arch.

For example, an XML file used by multiple platforms (macOS/Windows) and have newline formatted for single arch only (for example : \r\n)

The question is whether I can let git handle this and show each file in the correct formatting according to the architecture ?

Thanks !

Zohar81
  • 4,554
  • 5
  • 29
  • 82

1 Answers1

2

This question isn't specific to macOS. It's really a Windows versus Unix (which includes Linux and macOS) issue. If you google for git newline conversion you'll find many relevant documents such as https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings. Not to mention other times this has been asked on Stackoverflow such as How to change line-ending settings.

Kurtis Rader
  • 6,734
  • 13
  • 20