6 years, 7 months ago.

Working with both mbed compiler and mbed cli

I have a project that is compiling (created with "new") on the mbed compiler. I'm assuming this creates a local repository for my account? But i can't see it as a repository on my dashboard. Selecting commit from the compiler gives an error "can't commit" How do i convert an existing project into a repository? I would eventually like to be able to work with both the compiler and the mbed cli on the same git repository. Is this possible?

Hmm... That should actually work, create new project -> commit -> publish. What template did you use to create the new project? I just tested it on one of my projects and that worked fine...

posted by Jan Jongboom 27 Sep 2017

1 Answer

6 years, 7 months ago.

Quote:

I would eventually like to be able to work with both the compiler and the mbed cli on the same git repository

The mbed website only hosts hg repositories, so you will not see a git repository on your dashboard.

However, if you are OK using hg, the workflow would be:

  1. Create a repository on the mbed website.
  2. Use 'mbed import' to clone the repository locally
  3. Make any changes
  4. Use the instructions for publishing local code found here - https://github.com/ARMmbed/mbed-cli#publishing-your-changes
  5. Import that library into the online compiler and make/publish changes
  6. Use mbed sync to keep your local copy up to date - https://github.com/ARMmbed/mbed-cli#updating-programs-and-libraries

If you would like to use git:

  1. use mbed new to create a new project locally
  2. Create a github repository - https://help.github.com/articles/creating-a-new-repository/
  3. Add the new repository's remote to your local copy - https://help.github.com/articles/adding-a-remote/
  4. Use the instructions for publishing local code found here - https://github.com/ARMmbed/mbed-cli#publishing-your-changes
  5. To use this repository in the online compiler, use the "import from URL" feature to import the repo from your git repository URL. Though, you cannot push changes from the online compiler into a git repository. You could press "publish" in the online compiler, and this will create a fork of the git repository for you on the mbed site.

Accepted Answer