You are viewing an older revision! See the latest version

Collaboration/Getting started

« Collaboration

First some terminology:

  • Remote repository - A library or program which is published on mbed.org.
  • Local repository - A library or program which is in your private workspace. A Local repository may be 'linked' to a Remote repository if it was imported or published.
  • Pull - Copy changes from Remote repository to a Local repository in your workspace.
  • Push - Copy changes from Local repository to a Remote one.
  • Fork - Create Remote repository on mbed.org from imported Local repository (that may also contain local changes/modifications) under your profile.
  • Publish - Publish changes to existing repository (push) or create new one (fork)
  • Update - Pull from a Remote repository and switch your Local repository to the latest revision.

Basic collaboration

The most basic (and the most popular) usage of the collaboration system is the traditional workflow where one author develops a project, multiple users import and use it.

http://mbed.org/media/uploads/dan/author.png

When you import a repository, you are making a clone of a public repository in your private workspace. An imported repository can either be a whole program or a library for a program and can contain dependencies to other repositories. For example, a library may need another library in order to work. All dependencies will be imported for you automatically when you import a repository.

Once imported the local repository in your workspace will be 'linked' to the public repository by URL to let you check it's status, receive new changes and even contribute code to it.

To import a repository, simply click the Import link on the repository on the mbed website, or use the Import button within the mbed Compiler. You can read more about importing on the Importing code wiki page.

Getting updates

You will receive notification for a new version for any imported program or library in the Browser panel under Summary tab.

It is also possible to view detailed information about the new changes in the bottom part of the Revisions panel.

/media/uploads/screamer/revision-history-update.png?v=3

To get the latest version of the code, simply click the 'Update' button.

Forking a repository

When you add changes to an imported repository in your private workspace, you might want to publish them for others to use.
Unless you are the author of the imported repository or have developer access (see working with multiple authors), you would be forced to fork (or re-publish).

Open the context menu of the imported program or library and click the Publish menu item as shown below:

/media/uploads/screamer/publish-menu-fork.png?v=2

You will be prompted to publish to the linked remote repository:

/media/uploads/screamer/publish-dialog.png?v=2

As you do not have permission to publish to the repository, click the "Fork..." button. This will publish the repository in your profile on the mbed.org website, along with your changes.

Notice

When you fork a local repository in your private workspace, the local repository will be linked to the forked remote repository - the URL changes to the forked repository URL. You can view and change the URL by clicking the pencil icon next to the URL in the Revisions panel.

The forking process is identical to the code publishing workflow/interface with the exception that the forked repository will be recognized as a fork of the original/imported one.

Updating from a fork

If someone forks one of your repositories and modifies it, you can easily pull in any changes they have made into your own workspace.

First click the 'Update from' button'

/media/uploads/screamer/update-from-buttom.png

Then, enter the URL of their published repositories you want to pull changes from.

/media/uploads/dan/pull_from_url.png

Click OK, and the commits will be pulled into your repository.

Note that this won't change the URL of your local repository.


All wikipages