git-annex/doc/todo/renameremote.mdwn

24 lines
1.1 KiB
Text
Raw Normal View History

2016-11-21 16:30:15 +00:00
Sometimes a name has been used for a special remote, and you want to change
the name. A common reason is that the special remote has become dead, and
you want to reuse the name for a new special remote.
Initremote prevents reusing a name when the old one exists, even if the old
one is dead. And that makes sense in general, because a dead remote can
come back sometimes, and that would leave the repo with two special remotes
with the same name, and so enableremote would need to be run with a uuid
instead of a name to specify which one to enable, which is not a desirable
state of affairs.
2019-04-15 17:05:44 +00:00
So, add `git annex renameremote oldname newname`. Updates the remote.log
with the new name.
This could also do a `git
2016-11-21 16:30:15 +00:00
remote rename`, or equivilant. (`git remote rename` gets confused by special
remotes not having a fetch url and fails; this can be worked around by
2019-04-15 17:05:44 +00:00
manually renaming the stanza in git config.) But.. Perhaps it's better to
keep it simple and not do that. There's no necessarily a correspondance
between the name of a remote in the local repo and the name of a
special remote in the remote.log.
2016-11-21 16:30:15 +00:00
2019-04-15 17:05:44 +00:00
[[done]] --[[Joey]]