Downloading the Code / Using Git

This article explains where to get the ArduPilot code and how to submit changes to the project.

Overview

The ArduPilot project uses git for source code management and GitHub for source code hosting.

For developers who simply want to take a quick look at the code, the source code for Plane, Copter, Rover, Sub and Antenna Tracker can be viewed with any web browser by going to the ArduPilot repo on Github.

For developers who wish to download and build the latest code:

Note that the latest firmware is built automatically and can be directly downloaded from firmware.ardupilot.org.

For developers who wish to download, compile, edit and then contribute code back to ArduPilot, the following steps should be followed:

  • fork the project to create a personal copy on GitHub

  • install a git client on your local computer

  • “clone” the project to download this copy to a local desktop computer

  • create a new branch on their local desktop to hold the new feature

  • edit the code and “commit” it to the local repo.

  • “push” the new branch up to the personal repo (i.e. their fork)

  • raise a pull request to get the changes merged into the “master” project.

Learning git

This guide covers the basic git commands/concepts needed to work with the project: clone, branch, commit, push.

If you want to know more about git there are many great resources online. Here are just a few you may find useful:

  • Try Git: browser-based interactive tutorial for learning git

  • Git Ready: tutorials of varying difficulty levels

  • Git SCM Book: introduction and full documentation

  • Git Flight Rules: a guide for what to do when things go wrong

Next Steps

Follow the links below to learn more about how we use Git with ArduPilot