git-annex-unlockgit-annexhttp://git-annex.branchable.com/git-annex-unlock/git-annexikiwiki2021-04-21T16:34:50Zcomment 1http://git-annex.branchable.com/git-annex-unlock/comment_1_d7f38f681be51db1244988847840d735/chocolate.camera2019-01-21T15:42:51Z2018-12-31T16:41:08Z
<blockquote><p>Normally, unlocking a file requires a copy to be made of its content, so that its original content is preserved</p></blockquote>
<p>Does that imply than, on v7 in a file system that does not support hard links such as FAT32, <code>git annex adjust --unlock</code> would effectively be creating a duplicate of all files via cp (which is incredibly costly time-wise specially for big repos and huge files) and would effectively double the size it occupies?</p>
comment 2http://git-annex.branchable.com/git-annex-unlock/comment_2_51158d4484ecb39633ec828beb8d9ce3/joey2019-01-21T15:42:51Z2019-01-01T16:21:04Z
<p>Yes, if you don't want the copy set annex.thin as documented on the man
page.</p>
comment 3http://git-annex.branchable.com/git-annex-unlock/comment_3_516a1522db3d1c14cc5131a24d672a8f/chocolate.camera2019-01-21T15:42:51Z2019-01-01T18:17:21Z
<p>The page about <a href="https://git-annex.branchable.com/tips/unlocked_files/">unlocked files</a> says:</p>
<blockquote><p>setting annex.thin only has any effect on systems that support hard links. It is supported on Windows, but not on FAT filesystems.</p></blockquote>
Move file from git annex to just git in one commithttp://git-annex.branchable.com/git-annex-unlock/comment_4_d04a1d4159306939b91a34fd17ab0325/tobiasBora2020-06-17T01:18:32Z2019-09-26T22:52:35Z
<p>Hello. I'd like to know, how could I move back a file managed by git annex to a normal file (for example, say I added by mistake a text file in it). For now, I do <code>git unlock MYFILE</code>, then I remove the file from git: <code>git rm --cached MYFILE</code>, and <code>git commit -am 'Remove file'</code>, and finally I add back the file, <code>git add MYFILE && git commit -am 'File added back in git'</code>. However, this creates two commits, which is a bit annoying and leave the feeling that the file has been removed while it was just a kind of modification. How could I do that in less commands, and with a single commit?
Thanks!</p>
Re: Move file from git annex to just git in one commithttp://git-annex.branchable.com/git-annex-unlock/comment_5_40abc819288a97753747562f16b8febe/joey2020-06-17T01:18:32Z2019-09-30T17:29:39Z
<p>See <a href="http://git-annex.branchable.com/tips/largefiles/">largefiles</a>, it has recipes for conversion from annex to git and
from git to annex.</p>
issue with examplehttp://git-annex.branchable.com/git-annex-unlock/comment_6_047355b1ba5e90b71fc85b42f52d1aeb/Ilya_Shlyakhter2021-03-02T22:09:45Z2021-02-28T23:18:26Z
<p>In the example, wouldn't <code>git-annex-unlock</code> erase any edits made in gimp? Was this meant to use <code>git-annex-add</code> instead?</p>
<h1>EXAMPLES</h1>
<pre><code># git annex unlock photo.jpg
# gimp photo.jpg
# git annex lock photo.jpg
# git commit -m "redeye removal"
</code></pre>
re: issue with examplehttp://git-annex.branchable.com/git-annex-unlock/comment_6_7ab5b674d0fc18da262e6c0264953e21/joey2021-03-02T22:09:45Z2021-03-01T17:07:06Z
<p><code>git-annex lock</code> wouldn't erase any modifications, but it would fail
due to the file being modified. Fixed the example to use <code>git-annex add</code>
before locking.</p>
Are my unlocked, annexed files still safe?http://git-annex.branchable.com/git-annex-unlock/comment_8_d10c8b6e2dd8800cbfc11a7fa8536065/pat2021-04-21T15:47:48Z2021-04-21T15:47:48Z
<p>I want to double-check something: if I've annexed and committed files, I believe they are safely stored in git-annex even if I unlock them (as long as I don't use <code>--thin</code>). If I annex copies of the the same file, annex will only store it once, and use a symlink for the two original files. But if I unlock them, I can edit them independently.</p>
<p>Basically, unlock gives me an editable copy of the file - but I always have the original version, and can revert or check it out if I need to. Is that correct?</p>
clarifying unlocked fileshttp://git-annex.branchable.com/git-annex-unlock/comment_9_31c72f60ddf029f09c1850223d5a8a55/Ilya_Shlyakhter2021-04-21T16:08:05Z2021-04-21T16:08:05Z
Does the locked/unlocked state apply to one particular path within the repo, or to a particular key? Can the same key be used by both a locked and an unlocked file?
re: Are my unlocked, annexed files still safe?http://git-annex.branchable.com/git-annex-unlock/comment_10_1f5ca7ccd35e9b102bf24b3f14deeee1/kyle2021-04-21T16:32:42Z2021-04-21T16:32:42Z
<p>@pat:</p>
<blockquote><p>Basically, unlock gives me an editable copy of the file - but I always
have the original version, and can revert or check it out if I need
to. Is that correct?</p></blockquote>
<p>Yes, it's a copy as long as you don't set <code>annex.thin=true</code> (as you
mention). Just as with locked files, though, you may not be able to
get the content back from an earlier version if you've dropped unused
content.</p>
re: clarifying unlocked fileshttp://git-annex.branchable.com/git-annex-unlock/comment_11_26ad80a6ad142e7dac6c8af955a4413f/kyle2021-04-21T16:34:50Z2021-04-21T16:34:50Z
<p>@Ilya_Shlyakhter:</p>
<blockquote><p>Does the locked/unlocked state apply to one particular path within the
repo, or to a particular key?</p></blockquote>
<p>A particular path.</p>
<blockquote><p>Can the same key be used by both a locked and an unlocked file?</p></blockquote>
<p>Yes.</p>