We suggest that you install a Linux distribution on your computer and get familiar with it before
proceeding to the next sections.
Ask the community
If you have any questions about good practices in installing Ubuntu on your computer or other
questions about Ubuntu, join and ask on the Duckietown Slack!
Git
Every time there is a large project, with many contributors and the need for code versioning and history,
developers rely on VCS (Version Control Systems) tools. Duckietown uses Git as VCS and GitHub.com
as a service provider for it. The Duckietown organization page on GitHub is github.com/duckietown.
Monolithicity VS Modularity
Whether a software project should be monolithic or modular is one of the most debated decisions that
a group of developers faces at the beginning of a software project. Books have been written about it.
Duckietown started as a monolithic project, and some of us still remember the infamous Software
repository, and only later transitioned to a full modular approach.
There are two levels of modularity in Duckietown. We distinguish between Modules and Nodes.
Modules form our first and highest level of modularity, with each module being a collection of nodes.
Nodes constitute the smallest software entities, and each node is usually responsible for a very specific
task. Nodes are not allowed to exist outside modules. We will revisit these concepts later in the book,
but in a nutshell, modules represent high level concepts, like autonomous driving capability for a
vehicle, while nodes within a module tackle more granular tasks, like traffic signs detection.
In Duckietown, code is separated so that each module has its own repository. All official repositories
are hosted under the same GitHub organization github.com/duckietown. Be brave, (as of April 2020)
we have more than 220 repositories there. You can also have your own modules hosted as repositories
on your own GitHub account.
Git
This section goes through the most common operations you can perform on a git project and a git
project hosted on GitHub.com.
Terminology
A non-exhaustive list of terms commonly used in git follow.
Repository
A repo (short for repository), or git project, encompasses the entire collection of files and folders
associated with a project, along with each file’s revision history.
Branch
Branches constitute threads of changes within a repository. Though we call them branches, do not try
to force an analogy with tree branches, they are similar in spirit but quite different in how they work.
A repository is not allowed to exist without a branch, and every operation inside a repository only
makes sense in the context of a branch (the active branch). Inside a repository, you can have as many
branches as you want, but you always work on one branch at a time. Every git project has at least one
main branch, usually called the master branch.
Use the command git branch to see the list of branches present in your repository and which branch
you are currently working on.
Though, branches are used in different scenarios, they simply allow groups of developpers to work on
their own task without having their work affect or be affected by other groups’ work. For example, after
a project is released with version 1.0.0, one team is tasked to develop a new feature for the version