Skip to content

Commit a99514a

Browse files
saberrazwonder-sk
authored andcommitted
added an example for downloading a file at a specific version, taken from MD's ticket #140
1 parent 607ab82 commit a99514a

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ Commands:
8181
status Show all changes in project files - upstream and...
8282
```
8383

84+
### Examples
85+
8486
For example, to download a project:
8587

8688
```
@@ -91,6 +93,23 @@ To download a specific version of a project:
9193
$ mergin --username john download --version v42 john/project1 ~/mergin/project1
9294
```
9395

96+
To download a sepecific version of a single file:
97+
98+
1. First you need to download the project:
99+
```
100+
mergin --username john download john/myproject
101+
```
102+
103+
2. Go to the project directory
104+
```
105+
cd myproject
106+
```
107+
108+
3. Download the version of a file you want:
109+
```
110+
mergin --username john download-file --version v273 myfile.gpkg /tmp/myfile-v273.gpkg
111+
```
112+
94113
If you do not want to specify username on the command line and be asked for you password every time,
95114
it is possible to set env variables MERGIN_USERNAME and MERGIN_PASSWORD.
96115

0 commit comments

Comments
 (0)