Skip to content

Working with git

Bazyli Polednia edited this page Mar 8, 2021 · 1 revision

This page explains our methods for working with git flow but is not a comprehensive tutorial, so if you do not have any experience with git, I recommend to check out this tutorial first.

Branching

When starting to work on a new feature or fix, start by creating a new branch in kebab-case format e.g. capture-camera-image. This way you will implement your changes without interfering with other peoples' code.

Commits

If I could summarize this page in one sentence - remember to give your commits descriptive title. It is hard to figure out what is happening in a feature branch with commits like:

  • fix
  • test method
  • changes

Instead, try to make the most important point of your changes e.g.

  • Change method X to run in parallel
  • Remove redundant variables from class X
  • Improve readability of method X

Remember to start your commit message with a verb in imperative mode e.g. "Include" not "Including" or "Includes". Limit the message title to 50 characters!

Make sure to commit your changes often - it makes it easier to roll back to last working version when something goes wrong. However, to limit the number of commits on the main branch after merging, make sure to squash your commits into a smaller number before creating a pull request.

If needed, include description in commit message. In general, it is just a longer version of commit message, but if the commit includes more changes which cannot be included in 50 character of the title, it is the perfect place for detailed info.

Integrating GitHub with Trello

Our Trello board has GitHub power-up, so you can link your branches, issues etc. to Trello cards. It makes it easier to track progress on the repository. To add your change to Trello card, click on the card → on the right side of the card you will see "Power-ups" section and "GitHub" in it -> "Attach Branch...", "Attach Commit..." etc.

Clone this wiki locally