Skip to content
Stefan Tomanek edited this page Jul 23, 2012 · 9 revisions

Firmware - GitHub mirror of the official SVN MultiWii

Introduction

The official development of MultiWii is stored in a SVN.

But we are more and more developers who want to use GitHub to code that's why we created the GitHub organization multiwii.

The goal of this organization is to federate and centralize the GitHub community effort behind multiwii.

This project is a mirror of the svn (trunk/MultiWii_shared) that is syncronized automatically. So you'll see every SVN commit with the commit author and comment.

It contains the firmware part of the MultiWii project.

How to clone and modify the source code

(Those instructions refer to the git command line tools, we are not covering git concepts - you should have the required tools at hand before proceeding.)

If you want to add your own modification to the source code, create a fork using the Github web site and clone it to your local system:

git clone git://github.com/multiwii/multiwii-firmware.git MultiWii
# or
git clone git@github.com:YOUR_GITHUB_ACCOUNT/multiwii-firmware.git MultiWii

Now the directory MultiWii/ contains a clone of the complete source code.

If you want to change any files in there, it is considered best practice to create a separate branch first to keep keep local and upstream changes separate:

cd MultiWii/
git checkout -b mychanges

Now you are using a branch called "mychanges" where you can store your modification and config data while leaving the original upstream branch untouched - this will make updating the source code easier.

To save the changes in the version history, you have to commit them:

git commit -a

If you have create your own fork, you can even publish your changes easily on your Github page again:

git push origin mychanges

Staying up to date

To stay up to date, you can update your local source tree from time to time. If you cloned the source code from our repository, this is quite easy; if you forked it using Github, check the web interface to sync your fork it to our main repository first.

cd MultiWii/
# we are now changing back to our pristine, original branch
git checkout upstream_shared
# and now we are pulling any changes made upstream into it
git pull origin
# and back to our local branch with our config we go...
git checkout mychanges
# and merge our local changes with the new code from upstream
git merge upstream_shared

Voila! Now your tree has all the new source code included while (hopefully) preserving your local changes.

Resources for Newcomers