forum/checkout view to directory outside of annexgit-annexhttp://git-annex.branchable.com/forum/checkout_view_to_directory_outside_of_annex/git-annexikiwiki2015-08-15T12:48:30Zcomment 1http://git-annex.branchable.com/forum/checkout_view_to_directory_outside_of_annex/comment_1_a31a501bdc28eabc60588502f7219e50/joey2015-08-11T17:22:01Z2015-08-11T16:57:45Z
<p>Well, you can certianly use --work-tree with git-annex. As a global git
option, it has to be passed after the "git" and before the "annex". However,
since the view is constructed by making symlinks to the annexed content,
the result will be a directory full of symlinks, rather than the contents
of the files. Also, it'll still update the repo to think it has this view
checked out, with confusing results.</p>
<p>rsync seems to be a perfectly good way to do what you want, if you want
to have copies of the files.</p>
<p>Or, you might consider making a shared clone of the git repo wherever you
want that tree of files, and checking out the desired view in the clone.
In a shared clone with a recent version of git-annex, running <code>git annex
get</code> will quickly hard-link the files from the main repo (when possible).</p>
comment 2http://git-annex.branchable.com/forum/checkout_view_to_directory_outside_of_annex/comment_2_b4abbb048ebcd3c4b59d20e103948fd8/mey.vn2015-08-12T10:54:29Z2015-08-12T10:54:29Z
thanks @joey - the shared clone strategy looks perfect as a way to leave the main repo alone while enjoying all the benefits of views.
git-new-workdirhttp://git-annex.branchable.com/forum/checkout_view_to_directory_outside_of_annex/comment_3_2139407a3a556023a2458148a4a2c009/konubinix2015-08-15T12:48:30Z2015-08-15T12:48:30Z
<p>I am not sure whether it would help, but to show views of my git-annex repositories without messing with the current working directory, I generally use git-new-workdir
https://github.com/git/git/blob/master/contrib/workdir/git-new-workdir</p>
<p>It allows to checkout a separate branch in another directory. The new directory's .git directory contains symbolic links to the parent one, making sure that changes in the new work dir are propagated to the parent one.</p>
<p>Hope that helps.</p>