What is a good workflow for git-annex?
Our development team uses git for version control and uses git-annex to store large binaries (data binaries, images, test binaries, etc.). While we were able to customize and use it, we had our set of problems.
A common action that we often perform has caused us problems:
-
Developer 1 adds some tests for the new feature and adds the relevant test data with git-annex.
git add <test-file> git annex add <data-file> git annex copy <data-file> --to=<remote location(we use s3 if that is relevant)> git commit -m 'Tests with data' git push git annex sync
-
The work is reviewed and merged (we use Github for hosting and follow the forking model where all work is done by the developer on his own fork and merged into the main repository via pull requests)
-
Developer 2 selects / merges with upstream and tries to run tests on his machine.
git fetch upstream git merge upstream/<branch> git annex sync git annex get
We often end up with the test data not being tracked in git or unable to be loaded from a remote location.
What's a good way to use git-annex in our workflow?
As an aside, what are other options that could make such a workflow better / easier to manage?
source to share
Ok Here we go:
Git manual App v6:
Server1 and Server2:
mkdir testdata
cd testdata
git init
git annex init "LocationNameIdentifyer"
git annex upgrade
git remote add OtherServerLocationNameIdentifyer ssh://otherserver.com/thedir
when this setup is ready and in the directory you can now run
no additional files.git annex sync --content
in both places if there are files in both places that you need to execute
git add --all
in both places to track current files as so-called unlocked files
after
git annex sync --content
in both places running lets say 3 times
everything is merged and now you can cron git app sync -content in both places and both have the same files on the working line if you want to keep track of new files you put in the location you do git add not git app add git app add will add files as so called locked files, making the overall workflow
source to share