Skip to content

Commit f3b067f

Browse files
committed
Remove redundant docs on mbed import, add, and remove
1 parent 5eb44d3 commit f3b067f

File tree

1 file changed

+4
-77
lines changed

1 file changed

+4
-77
lines changed

docs/tools/CLI/cli-collaborate.md

Lines changed: 4 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,7 @@
11

22
## Collaborate
33

4-
### Importing an existing program
5-
6-
Use `mbed import` to clone an existing program and all its dependencies to your machine:
7-
8-
```
9-
$ mbed import https://github.com/ARMmbed/mbed-os-example-blinky
10-
[mbed] Importing program "mbed-os-example-blinky" from "https://github.com/ARMmbed/mbed-os-example-blinky" at latest revision in the current branch
11-
[mbed] Adding library "mbed-os" from "https://github.com/ARMmbed/mbed-os" at rev #dd36dc4228b5
12-
$ cd mbed-os-example-blinky
13-
```
14-
15-
Mbed CLI also supports programs based on Mbed OS 2, which it automatically detects and which do not require additional options:
16-
17-
```
18-
$ mbed import https://mbed.org/teams/mbed/code/mbed_blinky/
19-
[mbed] Importing program "mbed_blinky" from "https://mbed.org/teams/mbed/code/mbed_blinky" at latest revision in the current branch
20-
[mbed] Adding library "mbed" from "http://mbed.org/users/mbed_official/code/mbed/builds" at rev #f9eeca106725
21-
[mbed] Couldn't find build tools in your program. Downloading the mbed 2.0 SDK tools...
22-
$ cd mbed-os-example-blinky
23-
```
24-
25-
You can use the "import" command without specifying a full URL; Mbed CLI adds a [prefix](https://github.com/ARMmbed) to the URL if one is not present. For example, this command:
26-
27-
```
28-
$ mbed import mbed-os-example-blinky
29-
```
30-
31-
is equivalent to this command:
32-
33-
```
34-
$ mbed import https://github.com/ARMmbed/mbed-os-example-blinky
35-
```
36-
37-
### Importing from a Git or GitHub clone
4+
### Importing from a cloned repository
385

396
If you have manually cloned a Git repository into your workspace and you want to add all missing libraries, then you can use the `deploy` command:
407

@@ -49,46 +16,6 @@ Don't forget to set the current directory as the root of your program:
4916
$ mbed new .
5017
```
5118

52-
### Adding and removing libraries
53-
54-
While working on your code, you may need to add another library to your application or remove existing libraries.
55-
56-
Adding a new library to your program is not the same as cloning the repository. Don't clone a library using `hg` or `git`; use `mbed add` to add the library. This ensures that all libraries and sublibraries are populated as well.
57-
58-
Removing a library from your program is not the same as deleting the library directory. Mbed CLI updates and removes library reference files. Use `mbed remove` to remove the library; don't remove its directory with `rm`.
59-
60-
#### Adding a library
61-
62-
Use `mbed add` to add the latest revision of a library:
63-
64-
```
65-
$ mbed add https://developer.mbed.org/users/wim/code/TextLCD/
66-
```
67-
68-
Use the `URL#hash` format to add a library from a URL at a specific revision hash:
69-
70-
```
71-
$ mbed add https://developer.mbed.org/users/wim/code/TextLCD/#e5a0dcb43ecc
72-
```
73-
74-
#### Specifying a destination directory
75-
76-
If you want to specify a directory to which to add your library, you can give an additional argument to ``add``, which names that directory. For example, If you'd rather add the previous library in a directory called "text-lcd" (instead of TextLCD):
77-
78-
```
79-
$ mbed add https://developer.mbed.org/users/wim/code/TextLCD/ text-lcd
80-
```
81-
82-
Although Mbed CLI supports this functionality, we don't encourage it. Adding a library with a name that differs from its source repository can lead to confusion.
83-
84-
#### Removing a library
85-
86-
If at any point you decide that you don't need a library any more, you can use `mbed remove` with the path of the library:
87-
88-
```
89-
$ mbed remove text-lcd
90-
```
91-
9219
### Exporting to desktop IDEs
9320

9421
If you need to debug your code, you can export your source tree to an IDE project file to use the IDE's debugging facilities. Mbed CLI supports exporting to Keil uVision, IAR Workbench, a Makefile using GCC Arm, Eclipse using GCC Arm and other IDEs.
@@ -182,15 +109,15 @@ When you create a new (local) version control managed program or library, its re
182109
1. Copy the URL/location of the new repository in your clipboard.
183110
1. Open command-line in the local repository directory (for example, change directory to `mbed-os-example/local-lib`).
184111
1. To associate the local repository:
185-
112+
186113
- For Git, run `git remote add origin <url-or-path-to-your-remote-repo>`.
187114
- For Mercurial, edit .hg/hgrc and add (or replace if exists):
188-
115+
189116
```
190117
[paths]
191118
default = <url-or-path-to-your-remote-repo>
192119
```
193-
120+
194121
1. Run `mbed publish` to publish your changes.
195122
196123
In a scenario with nested local repositories, start with the leaf repositories first.

0 commit comments

Comments
 (0)