This commit is contained in:
Joey Hess 2021-04-21 17:01:03 -04:00
parent c687eae80b
commit affdffb323
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 70 additions and 0 deletions

View file

@ -74,6 +74,12 @@ want to use `git annex renameremote`.
compatabilities.
<http://git-annex.branchable.com/tips/multiple_remotes_accessing_the_same_data_store/>
* `--private`
Avoid recording information about the special remote in the git-annex
branch. The special remote will only be usable from the repository where
it was created.
# COMMON CONFIGURATION PARAMETERS
* `encryption`

View file

@ -1158,6 +1158,19 @@ repository, using [[git-annex-config]]. See its man page for a list.)
To avoid that merging, set this to "false". This can be useful
particularly when you don't have write permission to the repository.
* `annex.privaterepo`
When this is set to true, no information about the repository will be
recorded in the git-annex branch.
For example, to make a repository without any mention of it ever
appearing in the git-annex branch:
git init myprivaterepo
cd myprivaterepo
git config annex.privaterepo true
git annex init
* `annex.hardlink`
Set this to `true` to make file contents be hard linked between the
@ -1527,6 +1540,13 @@ Remotes are configured using these settings in `.git/config`.
indicate that it does. This will cause git-annex to try to get all file
contents from the remote. Can be useful in setting up a caching remote.
* `remote.<name>.annex-private`
When this is set to true, no information about the remote will be
recorded in the git-annex branch. This is mostly useful for special
remotes, and is set when using [[git-annex-initremote]](1) with the
`--private` option.
* `remote.<name>.annex-bare`
Can be used to tell git-annex if a remote is a bare repository

View file

@ -0,0 +1,44 @@
Normally, when you clone a git-annex repository, and use git-annex in it,
and then push or otherwise send changes back to origin, information gets
committed to the git-annex branch about your clone. Things like the annexed
files that are in it, its description, etc.
If you don't want the world to know about your clone, either for privacy
reason or only because the clone is a temporary copy of the repository,
here's how.
Recently git-annex got a new config setting, `annex.privaterepo`.
Set it before you start using git-annex in a repository, and git-annex
will avoid recording any information about the repository into the
git-annex branch.
git clone ssh://... myclone
cd myclone
git config annex.privaterepo true
git annex init
Now you can use git-annex as usual, adding files to the repository,
getting the contents of files, etc.
When you push changes back to origin, do still push the git-annex branch,
since git-annex still uses it to record anything it needs to keep track of
that does not involve your private repository.
And be sure, when adding or editing annexed files, that you `git-annex copy`
them to a publically accessible repository. Otherwise, to everyone else,
there will seem to be no copies of that file availble anywhere, since they
won't know about your private repo's copy.
## private special remotes
You can also make private special remotes, by using `git annex initremote
--private`.
Like a private repository, git-annex avoids storing any information about
a private special remote to the git-annex branch. It will only be available in
the repository where the special remote was created.
Bear in mind that, if you lose the repository where the private special
remote was created, you'll lose the information git-annex needs to access
that special remote, and that will likely mean you'll not be able to
recover any files stored in it.