forum/git-annex-import questionsgit-annexhttp://git-annex.branchable.com/forum/git-annex-import_questions/git-annexikiwiki2019-01-21T15:42:51Zcomment 1http://git-annex.branchable.com/forum/git-annex-import_questions/comment_1_e353e5ae20ba379c42fb39825c57147e/andrew2019-01-21T15:42:51Z2019-01-01T19:36:35Z
<ul>
<li>files are imported recursively into the directory you call <code>git-annex import</code> from</li>
<li>What happens if two files with same basenames but different contents are imported from different paths: git-annex will skip importing these files unless you specify --force</li>
<li>When you import a directory, does this recursively import the full tree under it?: yes</li>
<li>Also, just to note, the command name may be confusing to users, because (5) it deletes the original files by default, which most import commands do not do: see discussion here: <a href="http://git-annex.branchable.com/bugs/Importing__95__Commands__95__Destructive__95__by__95__default/">http://git-annex.branchable.com/bugs/Importing__95__Commands__95__Destructive__95__by__95__default/</a></li>
<li>it is unrelated to git-annex-export: the intent is for it to eventually be related to export, see TODO here: <a href="http://git-annex.branchable.com/todo/import_tree/">http://git-annex.branchable.com/todo/import_tree/</a></li>
</ul>
<p>And I don't know about your <code>--batch</code> question.</p>
<p>With your <code>import a file into the annex only, without creating a symlink to it from the working copy</code> question:</p>
<p>You could do:</p>
<pre><code>git annex calckey path-of-file-not-in-repo
git annex setkey key-from-previous-command path-of-file-not-in-repo
</code></pre>
<p>But perhaps if this is generally useful there could be a <code>git annex reinject --unknown</code> command added to git-annex, or a <code>--import-keys-only</code> command added to <code>import</code>.</p>