forum/Adding selected big binaries recursivelygit-annexhttp://git-annex.branchable.com/forum/Adding_selected_big_binaries_recursively/git-annexikiwiki2016-10-05T21:04:48Zcomment 1http://git-annex.branchable.com/forum/Adding_selected_big_binaries_recursively/comment_1_6ff6031a5a44caf17f36c3569cca5512/joey2016-07-30T16:41:22Z2016-07-30T16:36:51Z
<p>It's fine to annex the big files and store the small files in git in
the usual way.</p>
<p>The <code>find | xargs</code> approach should work.</p>
<p>You can also use the <a href="http://git-annex.branchable.com/git-annex-matching-options/">git-annex-matching-options</a>, eg:</p>
<pre><code>git annex add --include='*.adi'
</code></pre>
<p>Or:</p>
<pre><code>git annex add --largerthan=1mb
</code></pre>
<p>You can also configure git-annex to know which files you consider
large, so that <code>git annex add</code> will annex the large ones and add
the rest to git not the annex. See <a href="http://git-annex.branchable.com/tips/largefiles/">largefiles</a></p>
didn't work for me, perhaps I did the attributes wrong?http://git-annex.branchable.com/forum/Adding_selected_big_binaries_recursively/comment_2_872bef6902ddb362b62d5e9ec1afe864/JohnFisher2016-08-04T20:43:15Z2016-08-04T20:43:15Z
<p>I created .gitattributes in the root of my repo:
jfisher@buildos1:~/annex$ cat .gitattributes
* annex.largefiles=(largerthan=100mb)
jfisher@buildos1:~/annex$ git config -l
user.email=jfisher@intouchhealth.com
user.name=John Fisher
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
annex.uuid=75d91aa9-f5fc-45b8-b62c-e6050ed7c3d5
annex.version=5</p>
<p>where I intend for all users of the repo to automatically add all files larger than 100Mb as annexed and add all other files as conventional git.</p>
<p>I ran
git annex add
and small text files were staged as links, as well as a large file</p>
<p>Comment? Ideas?</p>
re-format for readabilityhttp://git-annex.branchable.com/forum/Adding_selected_big_binaries_recursively/comment_3_4be5ca7a22db19a3152b54bee943f58c/JohnFisher2016-08-04T20:48:55Z2016-08-04T20:48:55Z
<pre><code>jfisher@buildos1:~/annex$ cat .gitattributes
* annex.largefiles=(largerthan=100mb)
jfisher@buildos1:~/annex$ git config -l
user.email=jfisher@intouchhealth.com
user.name=John Fisher
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
annex.uuid=75d91aa9-f5fc-45b8-b62c-e6050ed7c3d5
</code></pre>
<p>annex.version=5</p>
comment 4http://git-annex.branchable.com/forum/Adding_selected_big_binaries_recursively/comment_4_83b62738f79c434f5a2cacc9316e5d2b/joey2016-10-05T21:04:48Z2016-10-05T21:01:38Z
<p>That .gitattributes work when I try it here. Perhaps your version of
git-annex is too old to support it. Configuring annex.largefiles via
.gitattributes was first supported in version 6.20160211.</p>