aboutsummaryrefslogtreecommitdiff
path: root/doc/bare_repositories.mdwn
blob: a9ccab8d1b679dc1700a5452fe475ca991f7f7fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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.

Known to work ok:

* `git annex move --to` and `--from`, when pointed at a bare repository.
* `git annex copy` ditto.
* `git annex drop` can check that a bare repository has a copy of data
  that is being dropped.
* `git annex get` can transfer data from a bare repository.

There are a few caveats to keep in mind when using bare repositories:

* `git annex init` can be run in a bare repository, but it cannot
  store the name you gave the repository in .git-annex/uuid.log (because
  the bare repository has no such file to commit to). Instead, it will
  tell you a command to run in some non-bare clone of the repository.
* Some subcommands, like `fsck`, `trust`, `unused` and `fromkey`, 
  cannot be run in a bare repository. Those subcommands will
  refuse to do anything.
* `git annex setkey` is a plumbing-level command; using it manually
  to add content to a bare repository is not recommended, since there
  will be no record that the content is stored there.