Add features - ilabs-kdc/bluesky GitHub Wiki

When you want to add a feature/functionality to the iLabs BlueSky version, you should do this in a seperate branch. A new branch is basically a copy of the master branch. By creating a new branch, you prevent interfering with others that are working on BlueSky and you ensure that you always have a working program, namely the master version. After you fully tested your new feature, you can merge your branch into the master branch.

Creating a new branch

Follow the following steps to create a new branch:

  1. Go to the tab Code and click on the branch button.

image

  1. Give the new branch a (useful) name by typing the name in the Find or create a branch... field.
  2. Click on Create branch:.

image

Merging a branch

Merging branches can be done using GitHub, which is explained below, but it can also be done in for example PyCharm (click here to see how to do this).

  1. Go to the tab Pull requests and click on New pull request.

image

  1. Set the base repository from TUDelft-CNS-ATM/bluesky to ilabs-kdc/bluesky.

image

  1. Set compare from master to the name of your branch.

image

  1. If it shows the message Able to merge., you can click on Create pull request. If it shows the message Can’t automatically merge., it is wise to first merge the master branch into your own branch. This can be done for example within your IDE (e.g. PyCharm) and resolve the conflicts there. How this can be done in PyCharm is explained here. When you do this make sure that you pull the most recent version of the master branch from the repository. After doing this, you can follow the previous steps again and if everything went right it should show the message Able to merge..

image

image

image

  1. Optionally you can add a description of your feature/functionality and click on Create pull request.

image

  1. When you are working with multiple people on a project, the others now have the possibility to review and comment on your work. When everyone agrees with your work, or when you are just working alone on this project, you can click on Merge pull request and then your branch is merged with the master branch. You can then safely delete your branch (since all changes are now applied in the master branch).

image