tips/unlocked filesgit-annexhttp://git-annex.branchable.com/tips/unlocked_files/git-annexikiwiki2020-12-03T11:43:07Zusage changeshttp://git-annex.branchable.com/tips/unlocked_files/comment_1_29cef6b8e48e722fafed3fe9b7cefe08/grawity2016-01-15T13:31:37Z2016-01-15T13:31:37Z
<p>This sounds interesting. But OTOH I'm curious about upgrades from direct mode (which I assume will soon go away):</p>
<p>If currently I just use <code>annex add; annex sync --content</code> on a media repo, would that change to <code>git add --all; git commit -m whatever; annex unlock *; annex sync --content</code>? That is, will v6 require the manual commit step?</p>
<p>Also, when <code>annex get</code> or <code>annex sync</code> retrieve files from another repo, will there be an option to have the files unlocked by default, as in v5 direct mode?</p>
<p>(I'm kinda hoping for <code>annex init --thin</code> or something similar to the v5 <code>annex direct</code>, as manually setting config options is easy to forget.)</p>
comment 2http://git-annex.branchable.com/tips/unlocked_files/comment_2_54a1811ef2f57f0843e48572ab6713b8/joey2016-01-15T19:17:48Z2016-01-15T19:07:24Z
<p>Direct mode is not going away any time soon.</p>
<p><code>git add</code> adds the file to the annex in unlocked mode, and <code>git annex sync</code>
commits any such adds the same as any other changes, so all you need is
<code>git add --all; git annex sync --content</code></p>
<p>Whether a file is locked or unlocked is a property of the file, that gets
committed to git, so when you commit some unlocked files, they'll be
unlocked when they appear in other clones of the repository.</p>
comment 3http://git-annex.branchable.com/tips/unlocked_files/comment_3_f5f29661bd04a6bba6158307465981d9/wsha.code+ga2016-01-16T13:03:26Z2016-01-16T13:03:26Z
<ol>
<li>If you want to save a committed version of a file, is there a way to do that, other than <code>sync</code>ing to a remote that does not have <code>annex.thin</code> set?</li>
<li>If you <code>add</code> and <code>commit</code> a file multiple times in a repo without <code>sync</code>ing to a remote, what does the commit history look like on a remote when you do <code>sync</code> it? It just has several commits for which the file contents are not available?</li>
<li>If you want to preserve history with <code>annex.thin</code> set, do you just have to <code>sync</code> manually after each commit? I guess you might want to set up a git commit hook to do that in that case.</li>
</ol>
comment 4http://git-annex.branchable.com/tips/unlocked_files/comment_4_a8139747da8cbb2510b3647ba448d72d/joey2016-01-20T18:56:21Z2016-01-20T18:49:07Z
<p>@wsha.code, if you opt to use annex.thin, then commit a file, and then
edit the same file again and commit again, the older commit will be in
git's history, but if you check it out, the old content of the file won't
be available. This is very similar to what happens when not using annex.thin,
but later running git-annex unused and dropping the "unused" intermediate
version of the file.</p>
<p>Running <code>git annex sync --content</code> or just <code>git annex copy --to remote</code>
will get the thin version of the file saved on a remote, and then editing
it won't lose the content. But note that if you edited a file while it was
being copied off to the remote, the previous version would still get lost.</p>
<p>If these seem like troublesome behaviors, well that's why annex.thin is not
enabled by default.</p>
how to use normal rm to files directly?http://git-annex.branchable.com/tips/unlocked_files/comment_5_8225cb96640697d4955badfee5b75e39/stefan.huchler2016-11-04T21:04:56Z2016-11-04T21:04:56Z
<p>My problem is following, I delete files from a directory over normal delete functionality. I expect this files than be really deleted, at least on that repos. so that the diskspace for it is free.</p>
<p>I thought direct mode or now v6 with addunlocked setting is the solution to that. But either with thinmode there is a hardlink still there or without there is a copy in the directory.</p>
<p>I would rather not have to use dropunused to get rid of that, it would be good if git annex sync or assist could just add this changes to the history. I dont care if that would be the last copy, that does not matter for me in that usecase.</p>
<p>I want:</p>
<ol>
<li>access files (or hard links) not soft links</li>
<li>only saved space 1 time per file</li>
<li>deleted files give free the full space without usind drop-unused</li>
<li>files should be added/deleted in that repos, not only transfered from somewhere else.</li>
</ol>
<p>Do I need therefor a special repos like web/directory/rsync or can I do that somehow with such a normal repos? as far as I understand even if I would use web with a directory as parameter it would not save the files normaly in that directory?</p>
workaround to my requesthttp://git-annex.branchable.com/tips/unlocked_files/comment_6_666d88b862a7f6f5cd719e454a8a6469/stefan.huchler2016-11-05T14:53:36Z2016-11-05T14:53:36Z
<p>I guess adding a hourly cronjob that drop all unused filed would be accaptable maybe?</p>
<p>Or is there a better solution?</p>
NTFS Make it clear that it'll not work with annex.thinhttp://git-annex.branchable.com/tips/unlocked_files/comment_7_46ff6b142c4cc9ad07b0c8dc07ba9c09/colin.brosseau2019-01-21T15:42:51Z2019-01-03T18:04:58Z
<p>On the doc it's said that</p>
<p>"Note that setting annex.thin only has any effect on systems that support hard links. It is supported on Windows, but not on FAT filesystems."</p>
<p>Having read that, I was thinking that I'd be able to use <em>annex.thin</em> with NTFS but it doesn't work.
I'd specify clearly that NTFS would also not work with <em>annex.thin</em></p>
<p>Thanks</p>
Best solution to save disk space on exFAThttp://git-annex.branchable.com/tips/unlocked_files/comment_8_9e5d1a9523239cb601612951af5eb9f1/tjbk1232019-03-05T18:23:03Z2019-03-05T18:23:03Z
I see that <code>annex.thin</code> doesn't support FAT. What's the best option to save disk space when you <em>are</em> using FAT? I'm currently trying to put files that are more than 50% of a drive's size on that drive, with a v7 repository. Is that possible?
Re: Best solution to save disk space on exFAThttp://git-annex.branchable.com/tips/unlocked_files/comment_9_1cfd5f680f2d19ea1039ff0e7324083f/meribold2019-03-19T14:14:37Z2019-03-19T14:14:37Z
@tjbk123, I was wondering the same thing. I think just locking all files works.
Re: Best solution to save disk space on exFAThttp://git-annex.branchable.com/tips/unlocked_files/comment_10_add35d419c7735571208aa5e47437f99/meribold2019-03-19T14:22:57Z2019-03-19T14:22:57Z
Oh, I guess <code>git annex sync</code> unlocks everything again.
Re: Best solution to save disk space on exFAThttp://git-annex.branchable.com/tips/unlocked_files/comment_11_08102655fbb13e4977e82f3f097f28db/meribold2019-03-19T14:32:29Z2019-03-19T14:32:29Z
Maybe using a bare repository is the way to go.
comment 12http://git-annex.branchable.com/tips/unlocked_files/comment_12_8cd7855dc6419297174a32e847e5f49a/gueux2019-03-21T22:59:38Z2019-03-21T22:59:38Z
Same problem here! I would love to have an alternative to annex.thin on FAT.
comment 13http://git-annex.branchable.com/tips/unlocked_files/comment_13_99f82c84aa9d886062aa3e3956e1acf8/joey2019-03-22T13:39:23Z2019-03-22T13:31:52Z
<p><span class="createlink"><a href="http://git-annex.branchable.com/ikiwiki.cgi?do=create&from=tips%2Funlocked_files%2Fcomment_13_99f82c84aa9d886062aa3e3956e1acf8&page=todo%2Fannex.thin_without_hardlinks" rel="nofollow">?</a>annex.thin without hardlinks</span> is a tracking bug for annex.thin not
working on FAT etc.</p>
annex.thin without hardlinks would be useful for non-crippled systems as wellhttp://git-annex.branchable.com/tips/unlocked_files/comment_14_e3425d219001fc34470f0cd55fc7241e/yarikoptic2019-03-25T18:57:36Z2019-03-25T18:57:36Z
One of the concerns with use of git-annex on HPC and other heavily loaded systems is the >3x consumption of inodes due to all the symlinks etc. In some cases it could be completely avoided probably, if repository is instructed to be installed just for consumption (to access data) only. In this way it would be nice if we could get the same "annex.thin without hardlinks" that there would not be even any <code>.git/annex/objects</code> (<code>superthin</code>?) and files just get installed in-place.
comment 15http://git-annex.branchable.com/tips/unlocked_files/comment_15_4be14df022612d6301442b3210a17d0a/rshalaev2020-12-03T01:43:00Z2020-12-03T01:43:00Z
<p>Is where any way to make Git Annex use Windows 10 NTFS hardlinks in the working tree?</p>
<p>Looking to conserve disk-space while still being able to browse and view files content. Currently Git Annex is doubling the ammount of disk space.</p>
comment 16http://git-annex.branchable.com/tips/unlocked_files/comment_16_61121c6b95e1310df8132aca13924b88/Lukey2020-12-03T07:38:30Z2020-12-03T07:38:30Z
Yes, as the page above explains, <code>git config annex.thin true</code> and then <code>git annex fix</code>
Windows 10 NTFS hardlinks not workinghttp://git-annex.branchable.com/tips/unlocked_files/comment_17_15c6f8db289812e76859b21d158b1b2e/rshalaev2020-12-03T11:43:07Z2020-12-03T11:43:07Z
<p>Lukey - I tried git config annex.thin true and then git annex fix</p>
<p>Doing it on Windows NTFS drive did not create hard-links. I've followed the instructions. Could not get it to work. Always got copies of files instead of hardlinks.</p>
<p>From: -- Joey Hess <a href="mailto:id@joeyh.name">id@joeyh.name</a> Mon, 18 Apr 2016 18:33:52 -0400
git-annex (6.20160412) Changelog
* annex.thin and annex.hardlink are now supported on Windows.</p>
<p>Based on Joey change log - hard links should work on NTFS. According to my obesrvation and a report from colin.brosseau above (titles "NTFS Make it clear that it'll not work with annex.thin") it does not work.</p>
<p>Can anyone confirm if git annex can creates NTFS hardlinks? I can file a bug report if needed.</p>
<p>Thanks!</p>