Skip to content

Commit 29b9a66

Browse files
moygitster
authored andcommitted
Change incorrect uses of "remote branch" meaning "remote-tracking"
"remote branch" is a branch hosted in a remote repository, while "remote-tracking branch" is a copy of such branch, hosted locally. The distinction is subtle when the copy is up-to-date, but rather fundamental to understand what "git fetch" and "git push" do. This patch should fix all incorrect usages in Documentation/ directory. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 8b3f3f8 commit 29b9a66

File tree

6 files changed

+18
-15
lines changed

6 files changed

+18
-15
lines changed

Documentation/config.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -601,8 +601,9 @@ branch.autosetupmerge::
601601
this behavior can be chosen per-branch using the `--track`
602602
and `--no-track` options. The valid settings are: `false` -- no
603603
automatic setup is done; `true` -- automatic setup is done when the
604-
starting point is a remote branch; `always` -- automatic setup is
605-
done when the starting point is either a local branch or remote
604+
starting point is a remote-tracking branch; `always` --
605+
automatic setup is done when the starting point is either a
606+
local branch or remote-tracking
606607
branch. This option defaults to true.
607608

608609
branch.autosetuprebase::
@@ -613,7 +614,7 @@ branch.autosetuprebase::
613614
When `local`, rebase is set to true for tracked branches of
614615
other local branches.
615616
When `remote`, rebase is set to true for tracked branches of
616-
remote branches.
617+
remote-tracking branches.
617618
When `always`, rebase will be set to true for all tracking
618619
branches.
619620
See "branch.autosetupmerge" for details on how to set up a

Documentation/git-branch.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ Note that this will create the new branch, but it will not switch the
3737
working tree to it; use "git checkout <newbranch>" to switch to the
3838
new branch.
3939

40-
When a local branch is started off a remote branch, git sets up the
40+
When a local branch is started off a remote-tracking branch, git sets up the
4141
branch so that 'git pull' will appropriately merge from
42-
the remote branch. This behavior may be changed via the global
42+
the remote-tracking branch. This behavior may be changed via the global
4343
`branch.autosetupmerge` configuration flag. That setting can be
4444
overridden by using the `--track` and `--no-track` options.
4545

@@ -89,7 +89,8 @@ OPTIONS
8989
Move/rename a branch even if the new branch name already exists.
9090

9191
--color[=<when>]::
92-
Color branches to highlight current, local, and remote branches.
92+
Color branches to highlight current, local, and
93+
remote-tracking branches.
9394
The value must be always (the default), never, or auto.
9495

9596
--no-color::
@@ -125,11 +126,11 @@ OPTIONS
125126
it directs `git pull` without arguments to pull from the
126127
upstream when the new branch is checked out.
127128
+
128-
This behavior is the default when the start point is a remote branch.
129+
This behavior is the default when the start point is a remote-tracking branch.
129130
Set the branch.autosetupmerge configuration variable to `false` if you
130131
want `git checkout` and `git branch` to always behave as if '--no-track'
131132
were given. Set it to `always` if you want this behavior when the
132-
start-point is either a local or remote branch.
133+
start-point is either a local or remote-tracking branch.
133134

134135
--no-track::
135136
Do not set up "upstream" configuration, even if the

Documentation/git-checkout.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ entries; instead, unmerged entries are ignored.
9898
"--track" in linkgit:git-branch[1] for details.
9999
+
100100
If no '-b' option is given, the name of the new branch will be
101-
derived from the remote branch. If "remotes/" or "refs/remotes/"
101+
derived from the remote-tracking branch. If "remotes/" or "refs/remotes/"
102102
is prefixed it is stripped away, and then the part up to the
103103
next slash (which would be the nickname of the remote) is removed.
104104
This would tell us to use "hack" as the local branch when branching

Documentation/git-clone.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ objects from the source repository into a pack in the cloned repository.
131131
Set up a mirror of the source repository. This implies `--bare`.
132132
Compared to `--bare`, `--mirror` not only maps local branches of the
133133
source to local branches of the target, it maps all refs (including
134-
remote branches, notes etc.) and sets up a refspec configuration such
134+
remote-tracking branches, notes etc.) and sets up a refspec configuration such
135135
that all these refs are overwritten by a `git remote update` in the
136136
target repository.
137137

Documentation/git-describe.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ OPTIONS
3737
--all::
3838
Instead of using only the annotated tags, use any ref
3939
found in `.git/refs/`. This option enables matching
40-
any known branch, remote branch, or lightweight tag.
40+
any known branch, remote-tracking branch, or lightweight tag.
4141

4242
--tags::
4343
Instead of using only the annotated tags, use any tag

Documentation/user-manual.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1724,7 +1724,8 @@ accomplish the above with just a simple
17241724
$ git pull
17251725
-------------------------------------------------
17261726

1727-
More generally, a branch that is created from a remote branch will pull
1727+
More generally, a branch that is created from a remote-tracking branch
1728+
will pull
17281729
by default from that branch. See the descriptions of the
17291730
branch.<name>.remote and branch.<name>.merge options in
17301731
linkgit:git-config[1], and the discussion of the `--track` option in
@@ -2106,7 +2107,7 @@ $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
21062107
$ cd work
21072108
-------------------------------------------------
21082109

2109-
Linus's tree will be stored in the remote branch named origin/master,
2110+
Linus's tree will be stored in the remote-tracking branch named origin/master,
21102111
and can be updated using linkgit:git-fetch[1]; you can track other
21112112
public trees using linkgit:git-remote[1] to set up a "remote" and
21122113
linkgit:git-fetch[1] to keep them up-to-date; see
@@ -2800,8 +2801,8 @@ Be aware that commits that the old version of example/master pointed at
28002801
may be lost, as we saw in the previous section.
28012802

28022803
[[remote-branch-configuration]]
2803-
Configuring remote branches
2804-
---------------------------
2804+
Configuring remote-tracking branches
2805+
------------------------------------
28052806

28062807
We saw above that "origin" is just a shortcut to refer to the
28072808
repository that you originally cloned from. This information is

0 commit comments

Comments
 (0)