Is there a way to sync all (or a subset of) local branches, not just the currently checked out branch?
Does this make sense at all, or does this show I am missing some important point in git-annex?
I am asking because I would like to use git-annex to keep git repositories with normal git files (with versioned and branched content) in sync.
If it's not currently possible, could you provide some pointers on where to start, if I wanted to change to Haskell source?
Thnx
Ok, this is what I have come up with:
Merges can only be done on checked out branches. That's why the only way to do this without breaking the whole idea of git-annex (sync) is to check out each branch and run it separately.
What would be the easiest way to do this? Considering possible unsaved changes in worktree and index?
Maybe simply using git-clone /tmp locally, which uses hardlinks for .git/objects/ which should make it perform ok?
It turns out, this is even easier:
As the behavior of "git-annex sync" includes performing a "git commit -a", any pending changes in the work tree will be committed anyway. This means, that it is safe to simply checkout and sync any branch, one wants to sync.
Yes, that's right,
git annex sync
handles the current branch, and you can use it on different branches if desired.(It is actually possible to merge non-checked out branches, but I have not implemented that for sync.)