Format: Naming and commenting - Gym-Bros-Programs/banana-math GitHub Wiki

Branch names

Branch names must start the with the issue number that you are working on and a relatively descriptive name. If you subtask and plan to make one pull request for all of them then use the main issue number, if you plan to make multiple smaller pull requests then each of the branches should have the subtask's issue number.

e.g. Issue #1 is to change the colors of 3 buttons to red, yellow and blue. If I plan to change all 3 in one go my branch name would be: 1-button-color-change. If I planned to subtask and make smaller commits then I would have 3 branches, 1 for each color like: 2-change-button-red as an example

Commit Messages

Do not worry too much about the regular commit messages. However, for pull requests make sure you use a squash merge and also have the commit message follow the following format:

**1 line description of the tasks you did **

Paragraph(s) listing each class or group of classes you changed and concise description of the changes

Notes for future notes, risks, or tasks if needed

Who approved your pull request (Remember we should have it so that person A request PR, Person B approves, Person A merges to main making sure the pipeline works and the tests works)

Comments

Try not to use too much comments. Rather go for descriptive and clear names and have your code written so that it explains itself. Generally good idea to comment about anything you did that is weird to get around some issues.

Feature Branches

If you have a big task that needed to run all together or the code will break and at the same time you want to subtask it, you should create a feature branch that is based on main, e.g. feature/1-add-button-colors. You can commit changes there and ask for review to PR for that branch and then once everything is done and everything passed the tests and pipelines you can make a PR to merge the feature branch to main