forum/Move unsynced file in direct modegit-annexhttp://git-annex.branchable.com/forum/Move_unsynced_file_in_direct_mode/git-annexikiwiki2014-09-18T19:03:30Zcomment 1http://git-annex.branchable.com/forum/Move_unsynced_file_in_direct_mode/comment_1_12a797cba753168dfde9e6339c00f481/joeyh.name2014-09-18T18:27:37Z2014-09-18T18:27:37Z
<p>Well, you can run <code>git annex assistant</code> or <code>git annex watch</code> and it will automatically notice the moved file and commit it. I think this is what you were trying to do when you set annex.autocommit to true (which is the default so accomplished nothing).</p>
<p>But your example does show a bug: <code>git annex add</code> should add the dangling symlink to git in direct mode, as it already does in indirect mode. Fixed in <a href="http://source.git-annex.branchable.com/?p=source.git;a=commitdiff;h=44e7d6e1fe6e13091adbd572f66412e3601df3c5">44e7d6e1fe6e13091adbd572f66412e3601df3c5</a>.</p>
comment 2http://git-annex.branchable.com/forum/Move_unsynced_file_in_direct_mode/comment_2_f3aec24668c35780a033f2b035df10ee/xn2014-09-18T19:03:30Z2014-09-18T19:03:30Z
<p>Thanks for tracking down that bug and for clearing up my confusion about <code>annex.autocommit</code>, Joey.</p>
<p>I didn't realize <code>annex.autocommit=true</code> is only used by <code>git annex assistant</code> and <code>git annex watch</code>. I thought that running <code>git annex sync</code> with <code>annex.autocommit=true</code> would also commit the change.</p>
<p>A few small changes to <code>git-annex(1)</code> could clarify:</p>
<pre><code>sync [remote ...]
...
The sync process involves first committing all local *staged* changes...
annex.autocommit
Set to false to prevent git-annex assistant and *git-annex watch* from automatically committing changes to files in the repository.
</code></pre>