Adding your first contribution

Getting a task

During our meetings, we will usually discuss what are the important things on the team's to-do list. Once you have completed the first steps and tutorials, we will assign an issue to you. You can also browse that list and find something that looks interesting for you.

You can find good issues for new members by filtering the label 'good first issue'.

Create a branch

Before you start working, you should create a branch where you will save your changes.

Our repositories usually have the following branches:

  • kinetic - the stable branch which contains code which rarely fails and has been thoroughly tested.

  • devel - the development branch where you will find the latest version of our code, including bug fixes, new features and experimental code.

As a developer, you will usually always start your work based on the devel branch. Depending on what you are working on, try to follow our branch naming conventions:

  • feature/name-of-feature: New functionality that will be added to the robot. Make the name-of-feature part as descriptive as possible.

  • fix/issue-NNN: Fixing a bug that was found in existing code. If there is no issue for the bug you are trying to fix, just use a descriptive title.

To create a new branch which is based on devel, you can run the following command:

git checkout -b <new branch> devel

For example:

git checkout -b feature/my-very-descriptive-feature devel

For more information please look into the branching model guide.

Making modifications

Start working on your new task. From time to time, commit your work (and try to make good commits).

Add a new remote

You will eventually need to push your changes to your own fork. For that, you need to add a new remote in your laptop.

You can list the remotes in your repository with the following command:

git remote -v

By convention, the base repository (in this case, the b-it-bot's one) is called the upstream. Your fork is called origin.

First, let's rename the b-it-bots remote to match that:

git remote rename origin upstream

Now let's add your fork as origin:

git remote add origin git@github.com:<your GitHub user name>/<name of repository>.git

Here is an example with the mas_domestic_robotics repository:

Create a pull request

Once you have made some progress, create a pull request (often abbreviated PR) from your fork to b-it-bots/mas_domestic_robotics's devel branch:

Once you press the create pull request button, a form will appear. Try to follow the guidelines below:

  • Make the title of your PR descriptive. If it's not ready to be merged yet, it's convention to add WIP: at the beginning of the title. You can also mark your PR as a draft.

  • Add a (small) text describing what your changes are doing

  • Apply any labels that apply

  • Request a review from the senior members (GitHub will add some of them automatically, and will suggest some others).

Last updated