epcim
10/20/2015 - 11:39 AM

git-annex.howto.md

git-annex basics

doc

http://git-annex.branchable.com/git-annex/

setup

# git init . or git clone
git annex init "dontpanic"
git config annex.largefiles "not (include=*.md" or include=*.txt)

git remote add usbkey /path/to/usb/annex
git remote add alice/bob ssh://xyz/

git annex sync laptop
git annex get .

git annex sync
git-annex automatic sync

walkthrough

https://git-annex.branchable.com/walkthrough/

tags

git tag 1.0
rm -f my_cool_big_file
git commit -m deleted
git checkout 1.0

indirect mode

git annex unlock my_cool_big_file

only large files

git config annex.largefiles "largerthan=100kb and not (include=*.c or include=*.h)"
git config annex.largefiles "exclude=*"

unused

git annex dropunused 1-1000
git annex copy --unused --to backup/archive

fsck

git annex fsck

backups

git annex numcopies 2
git annex copy . --to usbdrive

where is

git annex whereis

Common tips

shared git annex directory between multiple users

https://git-annex.branchable.com/tips/shared_git_annex_directory_between_multiple_users/

git init shared ; cd shared # you can also do this on an existing git annex repo
git config core.sharedrepository group
chmod g+rwX -R .
chown -R :media .

git config core.sharedrepository world
chmod a+rwX -R .