finally document initremote type=git
This commit is contained in:
parent
e4e4777a9b
commit
8df0152633
2 changed files with 29 additions and 0 deletions
|
@ -24,6 +24,7 @@ the git history is not stored in them.
|
||||||
* [[tor]]
|
* [[tor]]
|
||||||
* [[web]]
|
* [[web]]
|
||||||
* [[webdav]]
|
* [[webdav]]
|
||||||
|
* [[git]]
|
||||||
* [[xmpp]]
|
* [[xmpp]]
|
||||||
|
|
||||||
The above special remotes are built into git-annex, and can be used
|
The above special remotes are built into git-annex, and can be used
|
||||||
|
|
28
doc/special_remotes/git.mdwn
Normal file
28
doc/special_remotes/git.mdwn
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
Normally a git repository is not treated as a special remote, but as a git
|
||||||
|
remote of the normal kind. Two exceptions to that are [[git-lfs]] and
|
||||||
|
[[gcrypt]] special remotes.
|
||||||
|
|
||||||
|
But it is possible to register a git repository as a special remote.
|
||||||
|
git-annex will use it remote the same as any normal git remote, but its
|
||||||
|
url will be recorded. One benefit of doing this is it allows [[git-annex-init]]
|
||||||
|
to autoenable the remote.
|
||||||
|
|
||||||
|
First you need a regular git remote with the url that you want to use for
|
||||||
|
the special remote.
|
||||||
|
|
||||||
|
git remote add tmpremote ssh://...
|
||||||
|
|
||||||
|
Then, to set up the special remote:
|
||||||
|
|
||||||
|
git annex initremote myremote type=git location=ssh://... autoenable=true
|
||||||
|
|
||||||
|
Now `git annex init` in each clone of the repository will autoenable myremote.
|
||||||
|
|
||||||
|
Note that the name of the git remote (`tmpremote` above) has to be
|
||||||
|
different than the name you later use for the special remote,
|
||||||
|
since [[git-annex-initremote]] will refuse to use the name of an existing
|
||||||
|
remote. To work around that, you could finish by removing `tmpremote` and
|
||||||
|
enable the special remote:
|
||||||
|
|
||||||
|
git remote remove tmpremote
|
||||||
|
git annex enableremote myremote
|
Loading…
Reference in a new issue