Hi,
i have an already existing git repository with a branch (master) and i added git annex to it (git annex init). Now i want to synchronise the file tracking information with annex through git annex sync, but keep the master branch unsynchronised (i want push/pull it manually as there are not only annexed files but also code). What is the best approach for my setup?
Sounds like you should just use normal
git push
/git pull
commands. Works fine with git-annex.Just be sure to include the
git-annex
branch in your pushes. Eg,git push origin master git-annex
You'll probably want to run
git annex merge
after pulling, to merge the local and remote git-annex branches.Thank you for your response.
So annex looks like it's not really designed to work with an existing git repository, but only standalone?!
I struggle to see how you could draw that conclusion from what I said.
git-annex will work fine in an existing git repository. You can mix regular git commands like
git add
,git push
,git pull
,git merge
with git-annex commands likegit annex add
,git annex copy --to origin
,git annex get
,git annex merge
, in the same repository.The
git annex sync
command effcetively runsgit commit; git pull; git annex merge; git push; git annex copy --to origin; git annex get
. If you don't want to run all those commands at once, you don't want to rungit annex sync
. That will not prevent you from using git-annex in any way.Hi,
thank you for your response. I just want to control my branches (master, dev and so on ...) by myself, without sync/master or sync/dev and without merging it automatically. But the git-annex branch should be populated between the repositories "magically" (some kind of "git annex syncannex"). As annex can't deliver such a basic functionality i assumed, that it was not designed to work with existing "real" git repositories.
I have explained clearly in comment #1 above how to do what you want to do, using git-annex, so it is a pity if still think that "annex can't deliver such a basic functionality".
It can. I have explained how. I don't know how to explain any better.