Relatedly, my team is struggling to identify the process for "add and share a file" - e.g., add the hash to git, and copy the content to a central git-annex remote, and push the git-annex branch information that the file is now in the central remote.
We used 'git annex sync' and 'git annex sync --content' for a while, but this creates the synced/ branches which introduced confusion; and it's unclear why both --content and with args are needed; and if I remember, it also committed or pushed changes we didn't want it to.
Maybe the OP has the same confusion, that there seems to be a missing git-annex-sync that does only (a) copy to a remote and (b) the git-annex branch work - Anyone able to help out direct us to how it's intended to be done?
If I am not mistaken, you need to:
1) manually fetch
git-annex
from everywhere,2) not have the
synced/master
branch (or it should be an ancestor ofmaster
),3) use git-annex-merge or
git annex sync --no-pull --no-push
(maybe just--no-pull
is enough),4) manually push
git-annex
back to every other repository.Other remarks:
git annex sync --cleanup
to delete allsynced/*
branches.git annex sync
— it will fetch all branches, but merge only the current.synced/git-annex
works, so maybe the real answer is more complex.Thank you!
Just to confirm then,
git-annex-merge
willgit-annex
ontogit-annex
synced/$branch
onto$branch
where$branch
is the checked out branch?
My goal is for all remotes to have a consistent view of where the annexed files are, without auto-merging any normal branches.
Is the process you described above the easiest way to achieve this?
Relatedly, my team is struggling to identify the process for "add and share a file" - e.g., add the hash to git, and copy the content to a central git-annex remote, and push the git-annex branch information that the file is now in the central remote.
We used 'git annex sync' and 'git annex sync --content' for a while, but this creates the synced/ branches which introduced confusion; and it's unclear why both --content and with args are needed; and if I remember, it also committed or pushed changes we didn't want it to.
Now we do like this:
I've read through https://git-annex.branchable.com/walkthrough/ , https://git-annex.branchable.com/todo/sync_--branches__to_sync_only_specified_branches___40__e.g._git-annex__41__/ , https://git-annex.branchable.com/sync/
Maybe the OP has the same confusion, that there seems to be a missing git-annex-sync that does only (a) copy to a remote and (b) the git-annex branch work - Anyone able to help out direct us to how it's intended to be done?
I think the new 'git annex sync --only-annex' will replace the last three lines of my sequence above. I aim to experiment to confirm that.
https://git-annex.branchable.com/todo/sync--branchesto_sync_only_specified_branches40e.g._git-annex41__/#comment-52dbdba2331659011519bcc4bda4cf18
(repeat with corrected formatting)
I think the new
git annex sync --only-annex
will replace the last three lines of my sequence above. I aim to experiment to confirm that.https://git-annex.branchable.com/todo/sync_--branches__to_sync_only_specified_branches___40__e.g._git-annex__41__/#comment-52dbdba2331659011519bcc4bda4cf18