# FreeCAD Dateien mit git versionieren

**URL:** https://forum.makerspace-gt.de/t/freecad-dateien-mit-git-versionieren/354
**Category:** Wiki
**Created:** [12. Mai 2020 um 05:07 UTC](https://forum.makerspace-gt.de/t/freecad-dateien-mit-git-versionieren/354 "2020-05-12T05:07:05Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![igami](https://forum.makerspace-gt.de/user_avatar/forum.makerspace-gt.de/igami/32/8_2.png) [@igami](https://forum.makerspace-gt.de/u/igami)
#### Post date: [12. Mai 2020 um 05:07 UTC](https://forum.makerspace-gt.de/t/freecad-dateien-mit-git-versionieren/354/1 "2020-05-12T05:07:05Z")

</div>

Die FreeCAD Dateien sind zip kompromierte XML Dateistrukturen.  
Ich habe geguckt wie sich diese mit git versionieren lassen.  
Dabei bin auch den Thread [Storing FreeCAD files in a git repo](https://forum.freecadweb.org/viewtopic.php?f=22&t=8688&start=30) gestoßen.  
Leider gibt es da noch keine Lösung, aber einen wink in die richtige Richtung: [Git Attributes](https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes)

Ich habe mir nun eine `.gitattributes` Datei angelegt:  
`*.FCStd diff=unzip`  
Dann noch ein `git config diff.unzip.textconv "unzip -p"`und tadaa:  
aus einem

```auto
    git diff lib/square.FCStd
    diff --git a/lib/square.FCStd b/lib/square.FCStd
    index b33cd60..16fdef0 100644
    Binary files a/lib/square.FCStd and b/lib/square.FCStd differ

```

wird

```auto
    git diff
    diff --git a/lib/square0.FCStd b/lib/square0.FCStd
    index ae34231..fbfdd17 100644
    --- a/lib/square0.FCStd
    +++ b/lib/square0.FCStd
    @@ -26,7 +26,7 @@
                 <String value=""/>
             </Property>
             <Property name="LastModifiedDate" type="App::PropertyString">
    - <String value="2020-05-12T04:41:23Z"/>
    + <String value="2020-05-12T04:43:32Z"/>
             </Property>
             <Property name="License" type="App::PropertyString">
                 <String value="All rights reserved"/>
    @@ -668,10 +668,10 @@ Wi
                         <Integer value="0"/>
                     </Property>
                     <Property name="ShapeColor" type="App::PropertyColor">
    - <PropertyColor value="1414856448"/>
    + <PropertyColor value="4283695104"/>
                     </Property>
                     <Property name="ShapeMaterial" type="App::PropertyMaterial">
    - <PropertyMaterial ambientColor="858993408" diffuseColor="1414856448" specularColor="0" emissiveColor="0" shininess="0.2000000029802322" transparency="0.0000000000000000"/>
    + <PropertyMaterial ambientColor="858993408" diffuseColor="4283695104" specularColor="0" emissiveColor="0" shininess="0.2000000029802322" transparency="0.0000000000000000"/>
                     </Property>
                     <Property name="Transparency" type="App::PropertyPercent">
                         <Integer value="0"/>
    @@ -759,4 +759,4 @@ Wi
         </ViewProviderData>
         <Camera settings=" OrthographicCamera { viewportMapping ADJUST_CAMERA position 0 0 17.320509 orientation 0 0 1 0 nearDistance 17.303188 farDistance 17.33783 aspectRatio 1 focalDistance 17.320509 height 34.641018 } "/>
     </Document>
    -^A^@^@^@^@<CC><CC><CC>^A^@^@^@^@<FF><FF><FF>^A^@^@^@^@<FF><FF><FF>^A^@^@^@^@<FF>TT^A^@^@^@^@^Y^Y^Y^A^@^@^@^@^Y^Y^Y
    \ No newline at end of file
    +^A^@^@^@^@<CC><CC><CC>^A^@^@^@^@<FF><FF><FF>^A^@^@^@^@<FF><FF><FF>^A^@^@^@^@^@T<FF>^A^@^@^@^@^Y^Y^Y^A^@^@^@^@^Y^Y^Y
    \ No newline at end of file

```

---

<div class="post-metadata">

### Author: ![igami](https://forum.makerspace-gt.de/user_avatar/forum.makerspace-gt.de/igami/32/8_2.png) [@igami](https://forum.makerspace-gt.de/u/igami)
#### Post date: [31. Januar 2021 um 20:24 UTC](https://forum.makerspace-gt.de/t/freecad-dateien-mit-git-versionieren/354/2 "2021-01-31T20:24:15Z")

</div>

Noch passend dazu: Git LFS for Dummies: Wenn die Daten nicht textbasiert vorliegen

> **[Git LFS for Dummies: Wenn die Daten nicht textbasiert vorliegen](https://codefluegel.com/blog/git-lfs-for-dummies/)**
>
> Das Versionsverwaltungssystem Git kennt jeder Entwickler. Was, wenn die Daten nicht textbasiert vorliegen; wenn Multimedia Assets eingecheckt werden sollen?
