forum/Split annex into multiplegit-annexhttp://git-annex.branchable.com/forum/Split_annex_into_multiple/git-annexikiwiki2017-04-05T20:01:44Zcomment 1http://git-annex.branchable.com/forum/Split_annex_into_multiple/comment_1_e934b404f738cbd67df928fd6769e3ff/joey2017-04-05T19:19:16Z2017-04-05T19:09:03Z
<p>Recent git-annex's support <code>git annex reinject --known</code></p>
<p>You can do this -- but do note that it leaves Global in an unusable state,
so only do it if you don't plan to use that repository again:</p>
<pre><code>chmod -R +w $Global/.git/annex/objects/
git annex reinject --known $(find $Global/.git/annex/objects/ -type f)
</code></pre>
<p>BTW, splitting the files amoung several git branches is also a useful
thing to do in this situation. Splitting amoung branches avoids most of
git's problems with a repository having too many files in it.</p>
comment 2http://git-annex.branchable.com/forum/Split_annex_into_multiple/comment_2_eec6bc8c49c08411a4bb2cf7cc1c4697/archimedes2017-04-05T20:01:44Z2017-04-05T20:01:44Z
<p>So actually "import --reinject-duplicates" solves the issue of reinject not being recursive.</p>
<p>That trick on .git/annex/objects/ is cunning, but the destruction of Global before everything has been finished is discomforting...if only there was a "--reinject-duplicates --duplicate" option for import.</p>
<p>No chance that I can make a recursive copy of .git/annex/objects with hardlinks can I? To then use with reinject-duplicates?</p>