I have a very large stack of files, with many large binaries. Unless I am told its a bad idea, I want to initialize a git annex archive with the big files 'git annex added' ( symlinked to hidden annex) and the rest of the files 'git added'
I tried- git annex add ".adi" find . -name ".adi" | git annex add find . -name "*.adi" | xargs git annex add git annex add robots/*.adi
Whats a good ( correct) way to do only the *.adi files recursively? ( its Friday PST here- will return Monday)
It's fine to annex the big files and store the small files in git in the usual way.
The
find | xargs
approach should work.You can also use the git-annex-matching-options, eg:
Or:
You can also configure git-annex to know which files you consider large, so that
git annex add
will annex the large ones and add the rest to git not the annex. See largefilesI created .gitattributes in the root of my repo: jfisher@buildos1:~/annex$ cat .gitattributes * annex.largefiles=(largerthan=100mb) jfisher@buildos1:~/annex$ git config -l user.email=jfisher@intouchhealth.com user.name=John Fisher core.repositoryformatversion=0 core.filemode=true core.bare=false core.logallrefupdates=true annex.uuid=75d91aa9-f5fc-45b8-b62c-e6050ed7c3d5 annex.version=5
where I intend for all users of the repo to automatically add all files larger than 100Mb as annexed and add all other files as conventional git.
I ran git annex add and small text files were staged as links, as well as a large file
Comment? Ideas?
annex.version=5
That .gitattributes work when I try it here. Perhaps your version of git-annex is too old to support it. Configuring annex.largefiles via .gitattributes was first supported in version 6.20160211.