183 lines
6.3 KiB
HTML
183 lines
6.3 KiB
HTML
<!doctype html>
|
||
<html lang="en">
|
||
<head>
|
||
<title>git-annex</title>
|
||
<meta name="description" content="git-annex basics in datasets">
|
||
<meta name="author" content="The DataLad Team">
|
||
|
||
<meta charset="utf-8">
|
||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
|
||
<!-- Original reveal JS stylesheets-->
|
||
<link rel="stylesheet" href="../reveal.js/dist/reset.css">
|
||
<link rel="stylesheet" href="../reveal.js/dist/reveal.css">
|
||
<link rel="stylesheet" href="../reveal.js/dist/theme/beige.css">
|
||
<!-- custom styles, e.g., imgcredit -->
|
||
<link rel="stylesheet" href="../custom/css/main.css" id="theme">
|
||
<script src="../custom/js/printpdf.js"></script>
|
||
</head>
|
||
<body>
|
||
|
||
<div class="reveal">
|
||
<div class="slides">
|
||
|
||
<section>
|
||
<section>
|
||
<h1>Annexed files<br><small>The Basics</small></h1>
|
||
</section>
|
||
|
||
|
||
<section data-transition="None">
|
||
<h2>Git versus Git-annex</h2>
|
||
<dl>
|
||
<dt>Data in datasets is either stored in Git or git-annex</dt>
|
||
<dd>By default, everything is <i>annexed</i>, i.e. stored in a dataset annex</dd><br>
|
||
</dl>
|
||
<img height="400" src="../img/concepts/publishing_gitvsannex.svg">
|
||
<br><small>
|
||
<table>
|
||
<tr>
|
||
<td><b>Git</b></td>
|
||
<td><b>git-annex</b></td>
|
||
</tr>
|
||
<tr>
|
||
<td>handles <b>small</b> files well (text, code)</td>
|
||
<td>handles <b>all</b> types and sizes of files well</td>
|
||
</tr>
|
||
<tr>
|
||
<td>file contents are in the Git history
|
||
and will be <b>shared</b> upon git/datalad push</td>
|
||
<td>file contents are in the annex. Not necessarily shared</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Shared with every dataset clone</td>
|
||
<td><b>Can be kept private</b> on a per-file level when sharing the dataset</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Useful: Small, non-binary, frequently modified, need-to-be-accessible (DUA, README) files </td>
|
||
<td>Useful: Large files, private files</td>
|
||
</tr>
|
||
</table>
|
||
</small>
|
||
<br><br>
|
||
</section>
|
||
|
||
|
||
<section data-transition="None">
|
||
<h2>Git versus Git-annex</h2>
|
||
<small>More details in
|
||
<a href="http://handbook.datalad.org/en/latest/basics/101-115-symlinks.html" target="_blank">
|
||
this handbook chapter</a>.
|
||
</a> </small><br>
|
||
Git and git-annex handle files differently:
|
||
|
||
Annexed contents are retrieved on demand, files in Git are downloaded during <code>clone</code>.
|
||
|
||
Files stored in Git are modifiable, annexed files are write-protected.<ul>
|
||
<table>
|
||
<tr>
|
||
<td style="vertical-align:middle">
|
||
<li>Annexed contents are hashed, moved to <code>.git/annex/objects</code> and symlinked.</code></li>
|
||
<li>Git versions the symlink (content-identity), not the content.</li>
|
||
<li>Content is "locked" (write-protected) against accidental modifications.</li>
|
||
</td>
|
||
<td width="60%">
|
||
<img src="../img/concepts/git_vs_gitannex.svg" height="500">
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
|
||
<li>Content identity and availability information of annexed files are available after cloning
|
||
to <code>get</code> file contents.
|
||
Content changes are immediately transparent.
|
||
</li>
|
||
</ul>
|
||
</section>
|
||
|
||
<section data-transition="None">
|
||
<h2>Annexed files on Windows</h2>
|
||
Windows' file system does not support symlinks. Under these conditions, git-annex automatically operates
|
||
in "<a href="https://git-annex.branchable.com/tips/unlocked_files/" target="_blank">adjusted unlocked mode</a>":
|
||
<table>
|
||
<tr>
|
||
<td style="vertical-align:middle">
|
||
<li>File contents are <em>duplicated</em>: One copy to edit, one to keep safe.</li>
|
||
<li>File contents are always modifiable.</li>
|
||
<strong>Trade-off</strong>: disk space use, vs easy modification.
|
||
</td>
|
||
<td width="60%">
|
||
<img src="../img/concepts/git_vs_gitannex_windows.svg" height="500">
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<ul>
|
||
<li>Annexed files are <a href="https://git-annex.branchable.com/internals/pointer_file/" target="_blank">pointer files</a> instead of symlinks: A text file with the contents "/annex/objects/" followed by the key. </li>
|
||
<li>Git annex uses "<a href="https://git-annex.branchable.com/design/adjusted_branches/" target="_blank">adjusted branches</a>,
|
||
which unlock on top the locked counterpart branch. Compatibility with other systems but confusing Git log and issues in some nesting usecases. </li>
|
||
</ul>
|
||
</section>
|
||
|
||
<section data-markdown data-transition="none"><script type="text/template">
|
||
## git-annex special remotes: talk to any service
|
||
|
||
<img src="../img/concepts/services_connected.svg" height="500">
|
||
|
||
Ready-to-use implementations of transport logistics exist for all major storage providers.
|
||
</script></section>
|
||
|
||
|
||
|
||
|
||
</section>
|
||
|
||
|
||
</div> <!-- /.slides -->
|
||
</div> <!-- /.reveal -->
|
||
|
||
<script src="../reveal.js/dist/reveal.js"></script>
|
||
<script src="../reveal.js/plugin/notes/notes.js"></script>
|
||
<script src="../reveal.js/plugin/markdown/markdown.js"></script>
|
||
<script src="../reveal.js/plugin/highlight/highlight.js"></script>
|
||
<script src="../custom/js/copy-code.js"></script>
|
||
<script>
|
||
// Full list of configuration options available at:
|
||
// https://github.com/hakimel/reveal.js#configuration
|
||
Reveal.initialize({
|
||
// The "normal" size of the presentation, aspect ratio will be preserved
|
||
// when the presentation is scaled to fit different resolutions. Can be
|
||
// specified using percentage units.
|
||
width: 1280,
|
||
height: 960,
|
||
|
||
// Factor of the display size that should remain empty around the content
|
||
margin: 0.1,
|
||
|
||
// Bounds for smallest/largest possible scale to apply to content
|
||
minScale: 0.2,
|
||
maxScale: 1.0,
|
||
|
||
controls: true,
|
||
progress: true,
|
||
history: true,
|
||
center: true,
|
||
|
||
transition: 'slide', // none/fade/slide/convex/concave/zoom
|
||
|
||
// Optional reveal.js plugins
|
||
plugins: [ RevealMarkdown, RevealHighlight, RevealNotes ]
|
||
|
||
});
|
||
</script>
|
||
|
||
<!-- A footer with a "1" and "home" button to get back to the first slide and the index page -->
|
||
<div id="hidden" style="display:none;">
|
||
<div id="header">
|
||
<div id="footer-left"><a href="#0">1️⃣</a></div><div id="footer-right"><a href="../workshops/2025-DKZ.2R.html">🏠</a></div>
|
||
<!-- <div id="footer-right"><a href="../index.html">🏠</a></div>--></div>
|
||
</div>
|
||
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
|
||
<script src="../custom/js/headerandfooter.js"></script>
|
||
|
||
</body>
|
||
</html>
|