example gitattributes would look like this: https://github.com/berndhahnebach/FreeC ... attributes
Code: Select all
# ****************************************************************************
# line endings
# for more information see forum topic and pull request
# https://forum.freecadweb.org/viewtopic.php?f=17&t=41117
# https://github.com/FreeCAD/FreeCAD/pull/2752
# get all used file types
# in a directory in a bash use
# find . -type f -name '*.*' | sed 's|.*\.||' | sort -u
# normalize the line endings of the following files
# standard files
*.bat text
*.cpp text
*.csv text
*.h text
*.md text
*.py text
*.qrc text
*.ts text
*.txt text
*.ui text
*.xml text
*.yml text
# Fem specific files
*.dat text
*.frd text
*.geo text
*.inp text
*.sif text
*.unv text
*.vtk text
*.z88 text
# exclude the following modules from normalize line endings
Assembly/** -text
Cam/** -text
Cloud/** -text
Drawing/** -text
Image/** -text
Import/** -text
Inspection/** -text
JtReader/** -text
Measure/** -text
Mesh/** -text
MeshPart/** -text
Part/** -text
PartDesign/** -text
Path/** -text
Plot/** -text
Points/** -text
Raytracing/** -text
ReverseEngineering/** -text
Robot/** -text
Sandbox/** -text
Ship/** -text
Sketcher/** -text
Spreadsheet/** -text
Start/** -text
Surface/** -text
TechDraw/** -text
TemplatePyMod/** -text
Test/** -text
Web/** -text
# they could be normalized as well, but they are not ATM
Complete/** -text
Idf/** -text
OpenSCAD/** -text