
* webapp: Detect when upgrades are available, and upgrade if the user desires. (Only when git-annex is installed using the prebuilt binaries from git-annex upstream, not from eg Debian.) * assistant: Detect when the git-annex binary is modified or replaced, and either prompt the user to restart the program, or automatically restart it. * annex.autoupgrade configures both the above upgrade behaviors. * Added support for quvi 0.9. Slightly suboptimal due to limitations in its interface compared with the old version. * Bug fix: annex.version did not get set on automatic upgrade to v5 direct mode repo, so the upgrade was performed repeatedly, slowing commands down. * webapp: Fix bug that broke switching between local repositories that use the new guarded direct mode. * Android: Fix stripping of the git-annex binary. * Android: Make terminal app show git-annex version number. * Android: Re-enable XMPP support. * reinject: Allow to be used in direct mode. * Futher improvements to git repo repair. Has now been tested in tens of thousands of intentionally damaged repos, and successfully repaired them all. * Allow use of --unused in bare repository. # imported from the archive
48 lines
1.9 KiB
Markdown
48 lines
1.9 KiB
Markdown
Due to popular demand, git-annex can now be used with bare repositories.
|
|
|
|
So, for example, you can stash a file away in the origin:
|
|
`git annex move mybigfile --to origin`
|
|
|
|
Of course, for that to work, the bare repository has to be on a system with
|
|
[[git-annex-shell]] installed. If "origin" is on GitWeb, you still can't
|
|
use git-annex to store stuff there.
|
|
|
|
It took a while, but bare repositories are now supported exactly as well
|
|
as non-bare repositories. Except for these caveats:
|
|
|
|
* `git annex fsck` works in a bare repository, but does not display
|
|
warnings about insufficient
|
|
[[copies]]. To get those warnings, just run it in one of the non-bare
|
|
checkouts.
|
|
* `git annex unused` in a bare repository only knows about keys used in
|
|
branches that have been pushed to the bare repository. So use it with care..
|
|
* Commands that need a work tree, like `git annex add` won't work in a bare
|
|
repository, of course.
|
|
* However, you can (with recent versions of git-annex) run `git annex copy`,
|
|
`git annex get`, and `git annex move` in a bare repository. These behave
|
|
as if the `--all` option were used, and just operate on every single
|
|
version of every single file that is present in the git repository
|
|
history.
|
|
|
|
***
|
|
|
|
Here is a quick example of how to set this up, using `origin` as the remote name, and assuming `~/annex` contains an annex:
|
|
|
|
On the server:
|
|
|
|
git init --bare bare-annex.git
|
|
cd bare-annex.git && git annex init origin
|
|
|
|
Now configure the remote and do the initial push:
|
|
|
|
cd ~/annex
|
|
git remote add origin example.com:bare-annex.git
|
|
git push origin master git-annex
|
|
|
|
Now `git annex info` should show the configured bare remote. If it does not, you may have to pull from the remote first (older versions of `git-annex`)
|
|
|
|
If you wish to configure git such that you can push/pull without arguments, set the upstream branch:
|
|
|
|
git branch master --set-upstream origin/master
|
|
|
|
|