forum/comprehension question: repository vs. working copy in direct modegit-annexhttp://git-annex.branchable.com/forum/comprehension_question__58___repository_vs._working_copy_in_direct_mode/git-annexikiwiki2016-03-12T16:58:09Zcomment 1http://git-annex.branchable.com/forum/comprehension_question__58___repository_vs._working_copy_in_direct_mode/comment_1_a6b4db0cefa439f72b97089d48dfacbd/joeyh.name2016-03-12T16:58:09Z2014-07-21T19:54:15Z
<p>A git repository is a <code>.git</code> directory (or <code>git.bare</code> for a bare repository).</p>
<p>A working tree is the directory that contains the <code>.git</code> directory.</p>
<p>That is standard git terminology; git-annex does not change this at all really. The only difference is that a file added to git-annex is in both the repository and the working tree at the same time, rather than their being 2 local copies of the file (which would need twice the disk space so not good for large files).</p>
<p><code>git annex sync</code> commits any changes to files in the working tree, and pushes those changes to other remotes. You need to pass --content to also make git-annex upload the files to other remotes. Once a remote has been pushed to, you can run <code>git annex merge</code> in it to update its working tree to reflect the pushed changes (<code>git annex sync</code> also does that merge).</p>
<p>To automatically sync changes to remotes, you can run the git-annex assistant.</p>