doc: remote: say that it only affects the local repository

Nothing that "git remote" does changes a remote repository.  "set-head"
updates the local refs/remotes/<name>/HEAD, not the remote's own HEAD;
"prune" deletes stale remote-tracking branches, not branches on the
remote; and so on.  The manual page never says so, and wording such as
"Set or delete the default branch ... for the named remote" can be read
as acting on the remote itself.  It was recently misread that way in a
discussion on another project's mailing list.

Say it once, near the top of the DESCRIPTION, rather than in the
description of each subcommand.

Signed-off-by: Matthias Goergens <matthias.goergens@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
next
Matthias Goergens 2026-09-29 20:00:10 +08:00 committed by Junio C Hamano
parent e9019fcafe
commit c5f8f60719
1 changed files with 5 additions and 0 deletions

View File

@ -28,6 +28,11 @@ DESCRIPTION

Manage the set of repositories ("remotes") whose branches you track.

`git remote` changes only the local repository, i.e. its configuration
and its refs, and never modifies a remote repository. Some subcommands,
such as `show`, `prune`, `update` and `set-head --auto`, contact a
remote repository to read from it.


OPTIONS
-------