143 lines
8.9 KiB
HTML
143 lines
8.9 KiB
HTML
<html><head><title>Arch Git/fr</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><link type='text/css' href='wiki.css' rel='stylesheet'></head><body><h1>Arch Git/fr</h1></div>
|
||
|
||
<div id="mw-content-text" lang="fr" dir="ltr" class="mw-content-ltr"><hr/>
|
||
<div class="mw-parser-output"><table class="fcinfobox wikitable ct" >
|
||
<tr>
|
||
<td class="ctTitle">
|
||
<h3><span class="mw-headline" id="Arch_Git.E2.80.8F.E2.80.8E"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Arch_Git.png" class="image"><img alt="Arch Git.png" src="32px-Arch_Git.png" width="32" height="32" srcset="/wiki/images/thumb/e/e3/Arch_Git.png/48px-Arch_Git.png 1.5x, /wiki/images/thumb/e/e3/Arch_Git.png/64px-Arch_Git.png 2x" /></a> Arch Git</span></h3>
|
||
</td></tr>
|
||
<tr>
|
||
<th class="ctOdd">Emplacement du menu
|
||
</th></tr>
|
||
<tr>
|
||
<td class="ctEven">Arch → Utilities → Git
|
||
</td></tr>
|
||
<tr>
|
||
<th class="ctOdd">Ateliers
|
||
</th></tr>
|
||
<tr>
|
||
<td class="ctEven"><a href="https://www.freecadweb.org/wiki/index.php?title=Arch_Module/fr" title="Arch Module/fr">Arch</a>
|
||
</td></tr>
|
||
<tr>
|
||
<th class="ctOdd">Raccourci par défaut
|
||
</th></tr>
|
||
<tr>
|
||
<td class="ctEven">
|
||
</td></tr>
|
||
<tr>
|
||
<th class="ctOdd">Voir aussi
|
||
</th></tr>
|
||
<tr>
|
||
<td class="ctEven">
|
||
</td></tr>
|
||
<tr>
|
||
<td class="ctToc"><br /><div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
|
||
<ul>
|
||
<li class="toclevel-1"><a href="#Arch_Git.E2.80.8F.E2.80.8E"><span class="tocnumber">1</span> <span class="toctext">Arch Git</span></a></li>
|
||
<li class="toclevel-1 tocsection-1"><a href="#Description"><span class="tocnumber">2</span> <span class="toctext">Description</span></a></li>
|
||
<li class="toclevel-1 tocsection-2"><a href="#Utilisation"><span class="tocnumber">3</span> <span class="toctext">Utilisation</span></a></li>
|
||
<li class="toclevel-1 tocsection-3"><a href="#Options"><span class="tocnumber">4</span> <span class="toctext">Options</span></a></li>
|
||
<li class="toclevel-1 tocsection-4"><a href="#Enabling_human-readable_diff_for_FCStd_files"><span class="tocnumber">5</span> <span class="toctext">Enabling human-readable diff for FCStd files</span></a></li>
|
||
</ul>
|
||
</div>
|
||
|
||
</td></tr></table>
|
||
<p><br />
|
||
</p><p><b>Note:</b> Starting from FreeCAD v0.17, this tool has been removed from the Arch Workbench and is now part of the external Webtools Workbench that you can install via menu Tools -> Addons Manager
|
||
</p>
|
||
<h2><span class="mw-headline" id="Description">Description</span></h2>
|
||
<div class="mw-translate-fuzzy">
|
||
<p>Cette commande permet de déposer le document actif à dans un référentiel <a rel="nofollow" class="external text" href="https://en.wikipedia.org/wiki/Git_%28software%29">GIT</a>. Le document actif doit être enregistré à l'avance, et puis part dans un dépôt GIT, configuré à l'extérieur de FreeCAD.
|
||
</p>
|
||
</div>
|
||
<p>Git is a complex tool, consider learning the basics of it before using this tool, to avoid wrong operations that can cause data loss. An abundant literature about GIT is available and easy to find on the internet.
|
||
</p><p>Current limitations:
|
||
</p>
|
||
<ul><li> The tool cannot create new repositories yet. You must have an existing local repository already created (FreeCAD will check if the current document file is inside a Git repository)</li>
|
||
<li> The tool cannot change or create branches. You must do that manually with standard Git tools.</li></ul>
|
||
<p><i>PS:'</i> pour pouvoir utiliser cette commande, le paquet <a rel="nofollow" class="external text" href="https://github.com/gitpython-developers/GitPython">gitpython</a> doit être installé sur votre système. Sur la plupart des distributions Linux, gitpython est disponible à partir des dépôts de logiciels standards comme <i>gitpython</i> ou <i>python-git</i>.
|
||
</p>
|
||
<h2><span class="mw-headline" id="Utilisation">Utilisation</span></h2>
|
||
<ol><li> Sauvez le document actif</li>
|
||
<li> Assurez-vous que le fichier enregistré fait déjà partie d'un git repository</li>
|
||
<li> Selectionnez menu Arch → Utilities → <span style="background: #DDDDDD; border: 1px solid #888888; padding: 0px 5px 1px 5px;"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Arch_CommitGit.png" class="image"><img alt="Arch CommitGit.png" src="16px-Arch_CommitGit.png" width="16" height="16" srcset="/wiki/images/thumb/f/ff/Arch_CommitGit.png/24px-Arch_CommitGit.png 1.5x, /wiki/images/thumb/f/ff/Arch_CommitGit.png/32px-Arch_CommitGit.png 2x" /></a> <a class="mw-selflink selflink">Git</a></span></li></ol>
|
||
<h2><span class="mw-headline" id="Options">Options</span></h2>
|
||
<div class="floatright"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Arch_Git_panel.jpg" class="image"><img alt="Arch Git panel.jpg" src="Arch_Git_panel.jpg" width="259" height="667" /></a></div>
|
||
<div class="mw-translate-fuzzy">
|
||
<ul><li> Vous ne devez "commiter" que le fichier sauvé par FreeCAD, ou tous les fichiers modifiés et qui sont aussi dans le GIT.</li>
|
||
<li> Vous pouvez optionnellement aussi "pousser" la branche par défaut dans la branche GIT courante.</li></ul>
|
||
</div>
|
||
<h2><span class="mw-headline" id="Enabling_human-readable_diff_for_FCStd_files">Enabling human-readable diff for FCStd files</span></h2>
|
||
<p>FreeCAD's <a href="Fcstd_file_format.html" class="mw-redirect" title="Fcstd file format">Fcstd file format</a> is a zip-based binary format, for which Git cannot produce proper diffs. This means that you cannot see what has changed between one version and another, and also that each new version stored in the Git repository is a full copy of the file.
|
||
</p><p>Although the second problem currently has no solution, the first one can be solved with a little tool available from the FreeCAD source code, called <a rel="nofollow" class="external text" href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Tools/fcinfo">fcinfo</a>. Git can be told to use the fcinfo utility to print a human-friendly report of a FCStd file, and, when asked to produce a diff between two FCStd files, will produce a diff between the two fcinfo reports instead. Please note that this is only visual feedback, a full copy of the file will still be stored internally.
|
||
</p><p>Example of a diff produced with fcinfo:
|
||
</p>
|
||
<pre>diff --git a/testhouse.FcStd b/testhouse.FcStd
|
||
index 08077b6..985b1d8 100644
|
||
--- a/testhouse.FcStd
|
||
+++ b/testhouse.FcStd
|
||
@@ -1,26 +1,25 @@
|
||
-Document: /tmp/43un09_testhouse.FcStd (442K)
|
||
- SHA1: 67c1985a45d93cba57d5bf44490897aba460100d
|
||
+Document: /tmp/zfXoDd_testhouse.FcStd (370K)
|
||
+ SHA1: db1cb5fca18af7bfdca849028f40550df4d845cb
|
||
Comment : This is a test house to showcase FreeCAD's BIM worflow and IFC export capabilities
|
||
Company : uncreated.net
|
||
CreatedBy : Yorik van Havre
|
||
CreationDate : Fri May 9 12:05:54 2014
|
||
FileVersion : 1
|
||
Id :
|
||
- Label : testhouse
|
||
- LastModifiedBy : Yorik van Havre
|
||
- LastModifiedDate : 2016-06-28T17:05:57-03:00
|
||
+ Label : testhouse2
|
||
+ LastModifiedBy : Yorik van Havre
|
||
+ LastModifiedDate : Sat Sep 13 20:46:36 2014
|
||
+
|
||
License : CC-BY 3.0
|
||
LicenseURL : http://creativecommons.org/licenses/by/3.0/
|
||
- ProgramVersion : 0.17R7800 (Git)
|
||
- TipName :
|
||
+ ProgramVersion : 0.15R3989 (Git)
|
||
Uid : 67e62d8a-6674-4358-92fe-615443be887a
|
||
- Objects: (231)
|
||
+ Objects: (221)
|
||
Annotation : Drawing::FeatureViewAnnotation
|
||
Annotation001 : Drawing::FeatureViewAnnotation
|
||
Annotation002 : Drawing::FeatureViewAnnotation
|
||
Annotation003 : Drawing::FeatureViewAnnotation
|
||
- Annotation004 : Drawing::FeatureViewAnnotation
|
||
- Annotation005 : Drawing::FeatureViewAnnotation
|
||
Array : Part::FeaturePython (9K)
|
||
Box : Part::Box (2K)
|
||
Building : App::DocumentObjectGroupPython
|
||
@@ -110,7 +109,7 @@ Document: /tmp/43un09_testhouse.FcStd (442K)
|
||
Floor : App::DocumentObjectGroupPython
|
||
Floor001 : App::DocumentObjectGroupPython
|
||
Floor002 : App::DocumentObjectGroupPython
|
||
- Frame : Part::FeaturePython (89K) </pre>
|
||
<p>Each FreeCAD file contains a SHA1 checksum number, which will change each time the file is saved, even if no contents was changed. So fcinfo will always print something, no matter of the contents changes.
|
||
</p><p>To enable the use of fcinfo (Linux and Mac only - TODO: add Windows instructions)
|
||
</p>
|
||
<ol><li> Save the fcinfo file somewhere in your system path</li>
|
||
<li> Make it executalbe</li>
|
||
<li> Create a .gitattributes file in your Git repository</li>
|
||
<li> Add the following line in it:</li></ol>
|
||
<pre>*.FCStd diff=fcinfo
|
||
</pre>
|
||
<div style="clear:both"></div>
|
||
</div>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
</div><div class="printfooter">
|
||
Online version: "<a dir="ltr" href="https://www.freecadweb.org/wiki/index.php?title=Arch_Git/fr&oldid=251653">http://www.freecadweb.org/wiki/index.php?title=Arch_Git/fr&oldid=251653</a>"</div>
|
||
<div id="catlinks" class="catlinks" data-mw="interface"></div><div class="visualClear"></div>
|
||
</div>
|
||
</div>
|
||
<div id="mw-navigation">
|
||
<h2>Navigation menu</h2>
|
||
|
||
</body></html> |