Hello,
A mode of operation that I find comfortable, and from various online posts it seems that so do some others, is putting whole git repositories in dropbox.
It seems that currently this mode of operations if not supported in a simple manner. (i.e. just add and let assistant do the work). Is there any workaround or possibility to do this?
Thanks!
I'll give this warning upfront: this works for me, but it requires manual intervention, and I wouldn't be surprised if this spectacularly broke with the assistant running in full auto mode.
I'm currently storing git repos inside of my annex by using a separated git dir, so that git doesn't detect the nested repository and balk at adding it. Doing a git clone or git init with a --separate-git-dir= argument puts what would normally be in .git in that directory, and creates a simple .git file in its place which references the separated git dir.
When I'm not using the repo, I move the .git file out of the directory, and everything looks like regular files to git-annex. When I want to use it, I move it back in place, and any git operations inside the repo directory use the inner git repo itself.
Another option I used for a while was to store bare repos in the annex, and doing checkouts from those repos.
Here is the relevant bug: http://git-annex.branchable.com/bugs/Can__39__t_add_a_git_repo_to_git_annex:___34__Invalid_path_repo__47__.git__47__X__34___for_many_X
Here's my scenario: I have been using Dropbox for several years. I want to move to git-annex.
For some time I used Bazaar repos inside Dropbox. A couple of times I accidentally modified files on one computer before another finished syncing, and the repo became mildly corrupted, but I recovered it okay.
Recently I switched to git, and so far, so good. I'm careful not to make any changes to my files before Dropbox is finished syncing, so everything works fine.
But when I add a directory containing a git repo to an annex, git-annex ignores the .git directory, so the repo isn't synced.
I read this forum thread, and I read the bug report, but there don't appear to be any real solutions.
This seems like what should be a fairly common use case: a user has a directory of simple text files, like shell scripts or org-mode files. He uses git to version-control them, and he uses Dropbox to sync the files and the git repo automatically between computers. Now the user wants to use git-annex instead, but if he does this, it will mean having to choose between:
I guess I could just use git instead of Dropbox or git-annex, but then I must choose between either:
This is one of my primary use cases for Dropbox/git-annex. I'd really appreciate any help in figuring this out. Thanks.
Another use case is when you use annex for backup. For example I keep most of my files (dotfiles, scripts, music, books, etc) in a "home" git annex repo. Part of them is stored in google drive, part in a pendrive, part in my home computer, part in my work computer. Every once in a while I sync everything into my home computer and into an additional external hard drive remote that I keep as a backup. Sadly, my archived git projects can't be managed like that. Nevertheless, it's not a big deal since they are already in the cloud (gitlab or github) and in my local filesystem. Besides, since they are archived, I can just create tarballs and add them to the annex (and in case annex allowed to store .git directories, I'd not be really comfortable with the huge amount of symlinks that would produce).
That said, it's kind of a bathos that the illusion of a distributed, decentralized, redundant, versioned, annotated, etc. filesystem over git is broken by git itself.