OK. It's been a while since I've done a bit of work on Cerberus. And last year I was looking into the line ending issue with git as part of the updates I was working on. But I have had to deal with a few personal issues over the last 3 months and haven't yet got round to integrating some of the desktop target changes into the latest Cerberus. So to start with I have posted this version of the .gitattribute file that I was working on. The idea is for the end user to set the global git settings to the correct value for their OS, set the eol of specific files via .gitattributes and preserve files that should not be touched. Git has been known to get it wrong when auto handling files by setting the eol of non text files, thus corrupting them.
Those file types that should be kept as binary will need to be hashed/CRC checked against the original versions released before the eol issue.
Those file types that should be kept as binary will need to be hashed/CRC checked against the original versions released before the eol issue.
Code:
# This file should be treated as a 'work in progress'.
# Merge, filters and union drivers may be need at a later date. See the git documentation on these for an explanation.
# Auto text: Let git handle line conversion for those file types not listed below or set to specific eol/type.
# You should read the documentation for git that relates dealing with global settings.
# On Windows, users should have CRLF>>LF on push LF>>CRLF on pull, so make sure that git config core.autocrlf=true.
# On Linux and OSX should be LF in both directions. You shouldn't need to do anything on these OS's, unless you have changed the default eol.
* text=auto
# Git files: setting these to lf should be ok. Make sure that you use an editor that doesn't change line endings. So NO notepad, use something like Visual Studio Code.
.gitattributes text eol=lf
.gitignore text eol=lf
.gitconfig text eol=lf
# CerberusX/MonkeyX files
# Should cxs/monkey source files have lf line endings?
*.cxs text eol=lf linguist-language=cerberus
*.cerberusdoc text eol=lf
*.monkey text eol=lf
*.monkeydocs text eol=lf
# Source files: Let git decide based on the git global settings. Using text without an eol should use the default core.autocrlf or the OS's git default settings.
# According to one source, the use of the built-in drivers such as 'csharp' should not be use as they may not updated on a regular basis and may cause compile errors.
*.c text
*.cc text
*.cxx text
*.cpp text
*.hpp text
*.h text
*.hpp text
*.hxx text
*.hh text
*.cs text
*.as text
*.htm text
*.html text
*.xhtml text
*.css text
*.json text
*.java text
*.js text
*.md text
*.xml text
*.ini text
*.hlsl text
*.rc text eol=crlf
*.bmx text
# Precompiled headers. Not sure if these should be touched, so treat them as binary files.
*.pch binary
# Visual Studio/Windows known common files convert from lf to crlf to avoid Visual studio warnings.
*.sln text eol=crlf
*.vcxproj text eol=crlf
*.vcxproj.filters text eol=crlf
*.csproj text eol=crlf
*.rex text eol=crlf
*.xaml text eol=crlf
*.appmanifest eol=crlf
*.manifest eol=crlf
# Assuming that pfx is a securty key and shouldn't be messed with.
*.pfx binary
# Xcode
# Check that these are correct and don't all need to be binary. Only pbxproj so far needs to be kept as binary as thats how Xcode handles it even though it is an xml file.
*.pbxproj binary
*.plist text eol=lf
*.xcworkspacedata text eol=lf
*.strings text eol=lf
*.m eol=lf
*.mm text eol=lf
*.xib text eol=lf
# Linux/OSX
*.sh text eol=lf
README text eol=lf
COPYING text eol=lf
CHANGES text eol=lf
# Windows
*.bat text eol=crlf
*.ps1 text eol=crlf
# Should txt cause problems with line endings on other OS's, then remove the eol=crlf and let git global 'text' deal with it.
*.txt text eol=crlf
# Android target.
/targets/android/template/*.keystore binary
/targets/android/template/gradletemplate/gradlew eol=lf
# Image/Fonts/Audio files
# List not complete. If any thing else is added to the repo then these need to be updated.
*.bmp binary
*.png binary
*.jpg binary
*.jpeg binary
*.ico binary
*.icns binary
*.cur binary
*.ttf binary
*.font binary
*.gif binary
*.wav binary
*.ogg binary
*.mp3 binary
*.m4a binary
*.tiff binary
*.caf binary
*.aiff binary
# Other binrary types such as static, shared libraries and document formats.
# List not complete. If any thing else is added to the repo then these need to be updated.
*.pdf binary
*.a binary
*.lib binary
*.so binary
*.dll binary
*.o binary
*.class binary
# Compressed archive files
# List not complete. If any thing else is added to the repo then these need to be updated.
*.gz binary
*.zip binary
*.ZIP binary
*.jar binary