Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 1 month 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?
1 Answer
7 years, 1 month 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:
- Create a repository on the mbed website.
- Use 'mbed import' to clone the repository locally
- Make any changes
- Use the instructions for publishing local code found here - https://github.com/ARMmbed/mbed-cli#publishing-your-changes
- Import that library into the online compiler and make/publish changes
- 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:
- use mbed new to create a new project locally
- Create a github repository - https://help.github.com/articles/creating-a-new-repository/
- Add the new repository's remote to your local copy - https://help.github.com/articles/adding-a-remote/
- Use the instructions for publishing local code found here - https://github.com/ARMmbed/mbed-cli#publishing-your-changes
- 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.
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