forum/Question: git-annex-only repo ?git-annexhttp://git-annex.branchable.com/forum/Question__58___git-annex-only_repo___63__/git-annexikiwiki2016-03-12T16:58:09ZYeshttp://git-annex.branchable.com/forum/Question__58___git-annex-only_repo___63__/comment_1_321632cc794c00181932f5737db9aff0/Marco2016-03-12T16:58:09Z2015-06-23T12:12:52Z
<p>Yes, you can do this. Simply set up a git annex repo and you are ready to go.
If you have the assistant running in the background it will take care of committing and distributing the files around.</p>
comment 2http://git-annex.branchable.com/forum/Question__58___git-annex-only_repo___63__/comment_2_941b62a63c11caa1ada5d544c2e926ca/boustanihani2016-03-12T16:58:09Z2015-06-23T12:42:46Z
you mean there is no need for track then ?
comment 3http://git-annex.branchable.com/forum/Question__58___git-annex-only_repo___63__/comment_3_0c0dad1ffa11f2f8708906d310a189db/Marco2016-03-12T16:58:09Z2015-06-24T07:23:28Z
<p>What do you mean by track?</p>
<p>If you are using the assistant, it will take care for you. It will add, commit and distribute files.</p>
<p>If you are using the command line without the assistant, you should have a look at the <a href="http://git-annex.branchable.com/walkthrough/">walkthrough</a>. You can play around with repositories in /tmp before you push all your important data into it <img src="http://git-annex.branchable.com/smileys/smile4.png" alt=";)" /></p>
comment 4http://git-annex.branchable.com/forum/Question__58___git-annex-only_repo___63__/comment_4_426160c2237db790b133b9c9f0abd4b2/boustanihani2016-03-12T16:58:09Z2015-06-24T10:14:18Z
<p>Thanks I'll take a look at git-annex assistant, all new to me <img src="http://git-annex.branchable.com/smileys/smile.png" alt=":)" /></p>
<p>Never mind about track, I thought git-annex is similar to git-lfs where you should manually call "track..." on files whose content should not be added to git...</p>
comment 5http://git-annex.branchable.com/forum/Question__58___git-annex-only_repo___63__/comment_5_36bd0a398b385e65df7eda26fa5c50d0/anarcat2016-03-12T16:58:09Z2015-06-24T12:14:02Z
you are correct. "git add" <em>will</em> add a file into git directly. "git annex add" is like "git track"...
comment 6http://git-annex.branchable.com/forum/Question__58___git-annex-only_repo___63__/comment_6_32fb6930bcaac36d00b088d8ee09face/boustanihani2016-03-12T16:58:09Z2015-06-24T14:06:35Z
<p>cool thanks <img src="http://git-annex.branchable.com/smileys/smile.png" alt=":)" /></p>
<p>Is it also possible to version control large binary files using git-annex assistant ??</p>
<p>I mean to be able to switch back to earlier versions when needed...</p>
<p>Is there something like a way to specify how many older versions should be kept in the repo? This would be a nice feature for preserving disk space...</p>
somewhathttp://git-annex.branchable.com/forum/Question__58___git-annex-only_repo___63__/comment_7_8278ee493da14aac86e928d2349d8173/anarcat2016-03-12T16:58:09Z2015-06-24T16:28:42Z
<p>git-annex doesn't deliberately keep all versions of the files. however, if you change a file (using <a href="http://git-annex.branchable.com/git-annex-edit/">git-annex-edit</a>), it will keep the old copy, which will become <a href="http://git-annex.branchable.com/walkthrough/unused_data/">unused data</a>. that data will be purged by the assistant after a while (if configured to do so) but you can also archive it, etc...</p>
<p>so in a way, yes, it is versionned, but the unused data is somewhat more 'brittle' than the current dataset.</p>
comment 8http://git-annex.branchable.com/forum/Question__58___git-annex-only_repo___63__/comment_8_3e24c9f9042d6abdafaae45015645b11/boustanihani2016-03-12T16:58:09Z2015-06-25T21:13:01Z
<p>Is it possible to force git-annex to keep all versions for some or all files??</p>
<p>Or (maybe better) specify how many old versions to keep (for example keep the last 20 versions or so...) ?</p>
comment 9http://git-annex.branchable.com/forum/Question__58___git-annex-only_repo___63__/comment_9_182c66e98086dbfde29b615d0cf0e8e4/joey2016-03-12T16:58:09Z2015-07-06T18:47:23Z
<p>If you use indirect mode, and avoid passing --force to any git-annex
commands, then git-annex will ensure that it always keeps all versions of
all files.</p>
<p>Any command that would delete any data requires the --force option.</p>
<p>If your repo uses direct mode, we can't make this guarantee, because
the files are left directly in your work tree and you can edit or delete
them manually and there's nothing git-annex can do to stop that.</p>
<p>There is not currently a way to keep a particular number of old versions of
a file. This comes down to picking the versions to keep or drop when
running <code>git annex dropunused</code> (with --force of course).</p>
comment 10http://git-annex.branchable.com/forum/Question__58___git-annex-only_repo___63__/comment_10_ada27f7b8c7dc3c388e6c56ef095e682/boustanihani2016-03-12T16:58:09Z2015-07-06T22:00:36Z
Thanks <img src="http://git-annex.branchable.com/smileys/smile.png" alt=":)" /> Just one last question, how what happens when 2 users edit the same file in parallel, how does git-annex deal with this by default? Does the newer one overwrite the old one or do we get some info like "unable to auto-merge"...
comment 11http://git-annex.branchable.com/forum/Question__58___git-annex-only_repo___63__/comment_11_531e6a091c8d005626e4e8290ba317d7/joey2016-03-12T16:58:09Z2015-07-06T22:13:24Z
<p>If using git-annex sync or git-annex merge to do the merging, it will
automatically resolve the merge conflict and put both conflicting versions
of the file in the tree under different filenames.</p>
<p>Of course, you can also use regular git commands to pull and merge your
master branch; then you'd get a regular git merge conflict.</p>