144 lines
9.7 KiB
HTML
144 lines
9.7 KiB
HTML
<html><head><title>Arch Git/es</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/es</h1></div>
|
||
|
||
<div id="mw-content-text" lang="es" 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">Menu location
|
||
</th></tr>
|
||
<tr>
|
||
<td class="ctEven">Arch → Utilities → Git
|
||
</td></tr>
|
||
<tr>
|
||
<th class="ctOdd">Workbenches
|
||
</th></tr>
|
||
<tr>
|
||
<td class="ctEven"><a href="Arch_Module.html" title="Arch Module">Arch</a>
|
||
</td></tr>
|
||
<tr>
|
||
<th class="ctOdd">Default shortcut
|
||
</th></tr>
|
||
<tr>
|
||
<td class="ctEven">
|
||
</td></tr>
|
||
<tr>
|
||
<th class="ctOdd">See also
|
||
</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="#Utilizaci.C3.B3n"><span class="tocnumber">3</span> <span class="toctext">Utilización</span></a></li>
|
||
<li class="toclevel-1 tocsection-3"><a href="#Opciones"><span class="tocnumber">4</span> <span class="toctext">Opciones</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>
|
||
<p>Este comando permite administrar el actual documento con <a rel="nofollow" class="external text" href="https://en.wikipedia.org/wiki/Git_%28software%29">GIT</a>. GIT es un sistema de control de versiones de archivos y mantiene seguimiento de los cambios.
|
||
</p><p>GIT es una herramienta compleja, considera aprender lo basico de el antes de usar esta herramienta, para evitar operaciones erroneas que pueden causar perdida de datos.Un literatura abundante acerca de GIT esta disponible y facil de encontrar en internet.
|
||
</p><p>Limitaciones actuales:
|
||
</p>
|
||
<ul><li>La herramienta todavia no puede crear nuevos repositorios. tu tienes que tener un repositorio ya creado (FreeCAD revisara si el actual archivo de documento esta dentro de un repositorio Git)</li>
|
||
<li>La herramienta no puede cambiar o crear derivaciones. tu debes hacer eso manualmente con herramientas regulares de Git.</li></ul>
|
||
<p><b>Nota:</b> para ser capaz de usar esta herramienta, el paquete <a rel="nofollow" class="external text" href="https://github.com/gitpython-developers/GitPython">gitpython</a> debe ser instalado en tu sistema. En la mayoria de las distribuciones linux, gitpython esta disponible de los repositorios de software estandar como <i>gitpython</i> o <i>python-git</i>.
|
||
</p>
|
||
<h2><span class="mw-headline" id="Utilizaci.C3.B3n">Utilización</span></h2>
|
||
<ol><li> Guardar el documento activo actual</li>
|
||
<li> Asegurarse que el archivo guardado esta dentro de un repositorio git existente</li>
|
||
<li> Seleccionar el menu Arquitectura -> Utilidades -> <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 href="Arch_Git.html" title="Arch Git">Git</a></span></li></ol>
|
||
<h2><span class="mw-headline" id="Opciones">Opciones</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>
|
||
<ul><li> Make sure the <b>Report Window</b> is open since Git messages will be printed there.</li>
|
||
<li> The Git tool will only open if the current file is saved inside a Git repository. It can be in a subdirectory.</li>
|
||
<li> The <b>Log</b> button will pop up a dialog showing the most recent log entries.</li>
|
||
<li> The <b>Refresh</b> button will re-scan the repository for changed files.</li>
|
||
<li> The <b>Diff</b> button will show the differences between the current version of a selected file and the previous version stored in the repository.</li>
|
||
<li> The <b>Select all</b> button will select all files to be committed.</li>
|
||
<li> The <b>Commit</b> button will commit the selected files. Be sure to write a commit message that describes the changes you are committing.</li>
|
||
<li> The <b>Pull</b> button will <b>download</b> any new changes to the repository from the selected remote. If the file currently opened in FreeCAD is being modified by a pull, a warning message will inform you so you can either save the file again or save it elsewhere.</li>
|
||
<li> The <b>Push</b> button will <b>upload</b> your latest commit(s) to the selected remote.</li></ul>
|
||
<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/es&oldid=251657">http://www.freecadweb.org/wiki/index.php?title=Arch_Git/es&oldid=251657</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> |