Skip to content

Commit 7533857

Browse files
authored
docs: show default remote in dvc remote list (#5353)
1 parent b5de79d commit 7533857

File tree

5 files changed

+29
-9
lines changed

5 files changed

+29
-9
lines changed

content/docs/command-reference/pull.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,16 @@ use `dvc remote list` to check them. To remember how it's done, and set a
235235
context for the example, let's define a default SSH remote:
236236

237237
```cli
238-
$ dvc remote add -d r1 ssh://user@example.com/path/to/dvc/remote/storage
238+
$ dvc remote add -d r1 \
239+
ssh://user@example.com/project/data/cache
239240
$ dvc remote list
240-
r1 ssh://user@example.com/path/to/dvc/remote/storage
241+
r1 ssh://user@example.com/project/data/cache (default)
242+
r2 ssh://user@example.com/other/storage
241243
```
242244

245+
Note that the default remote (if set) is also indicated when you run
246+
`dvc remote list`.
247+
243248
<admon type="info">
244249

245250
DVC supports [several storage types].

content/docs/command-reference/push.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ also `dvc remote add --default`). Let's see an SSH remote example:
117117

118118
```cli
119119
$ dvc remote add --default r1 \
120-
ssh://user@example.com/path/to/dvc/cache/directory
120+
ssh://user@example.com/project/data/cache
121121
```
122122

123123
<admon type="info">
@@ -127,7 +127,8 @@ use `dvc remote list` to check them:
127127

128128
```cli
129129
$ dvc remote list
130-
r1 ssh://user@example.com/path/to/dvc/cache/directory
130+
r1 ssh://user@example.com/project/data/cache (default)
131+
r2 ssh://user@example.com/other/storage
131132
```
132133

133134
</admon>

content/docs/command-reference/remote/default.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ is omitted.
4141
You can also use `dvc config`, `dvc remote add`, or `dvc remote modify` commands
4242
to set/unset/change the default remote.
4343

44+
If a default remote is set, the output of the `dvc remote list` command will
45+
specify it, see [the examples below](#examples).
46+
4447
Remotes are read from the system, global, project, and local config files (in
4548
that order).
4649

@@ -85,6 +88,14 @@ $ dvc remote default
8588
myremote
8689
```
8790

91+
See the default remote (if set) by listing all remotes:
92+
93+
```cli
94+
$ dvc remote list
95+
myremote /path/to/remote (default)
96+
otherremote /path/to/other/remote
97+
```
98+
8899
Change default remote value:
89100

90101
```cli

content/docs/command-reference/remote/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ The <abbr>project</abbr>'s config file should now look like this:
8282

8383
```cli
8484
$ dvc remote list
85-
myremote /path/to/remote
86-
newremote s3://mybucket/path
85+
myremote /path/to/remote (default)
86+
newremote s3://mybucket/path
8787
```
8888

8989
## Example: Customize an additional S3 remote

content/docs/command-reference/remote/list.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ usage: dvc remote list [-h] [--global | --system | --project | --local]
1313

1414
Reads [DVC configuration] and prints the list of available remotes, including their
1515
names and URLs/paths. Remotes are read from the system, global, project, and local
16-
config files (in that order).
16+
config files (in that order). The default remote (if set) will be specified in the
17+
output (see [the examples below](#examples)).
1718

1819
[dvc configuration]: /doc/user-guide/project-structure/configuration#remote
1920

@@ -51,10 +52,12 @@ And now the list of remotes should look like:
5152

5253
```cli
5354
$ dvc remote list
54-
myremote /path/to/remote
55+
myremote /path/to/remote (default)
56+
otherremote /path/to/other/remote
5557
```
5658

57-
The list will also include any previously added remotes.
59+
The list will also include any previously added remotes, and the default remote
60+
(if set).
5861

5962
[local remote]:
6063
/doc/user-guide/data-management/remote-storage#file-systems-local-remotes

0 commit comments

Comments
 (0)