You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,6 +62,17 @@ To uninstall *mbed-cli* you can use:
62
62
63
63
## Using mbed-cli
64
64
65
+
### Working context and command help
66
+
67
+
All *mbed CLI* commands use the current directory as a working context, meaning that before calling any *mbed* command, you should first change your working directory to the one you want to operate in. For example:
68
+
```
69
+
$ cd my-program
70
+
$ cd mbed-os
71
+
$ mbed update master # updates "mbed-os", not "my-program"
72
+
```
73
+
74
+
*mbed CLI* provides list of all available commnads and global help via `mbed --help`, and also command-specific help via `--help` param to the command, e.g. `mbed update --help`.
75
+
65
76
### Creating and importing programs
66
77
67
78
mbed CLI allows creating new programs and importing existing ones, always with the full mbed-os release as the program's basis.
@@ -187,6 +198,8 @@ You can apply the same mechanism for libraries and their dependencies by executi
187
198
188
199
#### Update options
189
200
201
+
<spanstyle="background-color:#E6E6E6;border:1pxsolid#000;display:block; height:100%; padding:10px">**Note**: As with any *mbed CLI* command, `mbed update` uses the current directory as a working context, meaning that before calling `mbed update` you should first change your working directory to the one you want to update, e.g. `cd mbed-os`.</span>
202
+
190
203
To help understand what options you can use with *mbed-cli*, please see the examples below.
191
204
192
205
**Case 1: I want to update a program or a library to the latest version in a specific or current branch**
It's important to remember that specifying a branch to `mbed update` would only checkout that branch and won't automatically merge/fast-forward to the remote/upstream branch. You can run `mbed update` to merge (fast-forward) your local branch with the latest remote branch. On git you can do `git pull`.
216
+
202
217
**Case 2: I want to update a program or a library to a specific revision or a tag**
0 commit comments