Git
If you are new or not majorly familiar with Git, it is HIGHLY recommended to use something like GitHub Desktop
If you are ever unsure about a specific command, button or anything else git related—Please do not run it, ask for help.
Git Workflow
When working on features, things should be split out into their own branches. This is to ensure that the main branch is always stable, and we can merge your changes in, without having to worry about breaking the main branch.
When creating branches, please follow these conventions:
- No symbols, No spaces, all lowercase letters
- Ensure the branch is prefixed with
feature//feat/for new features,fix/for bug fixes,refactor/for refactoring
Branches
Branches are split out into their own "folders" in the repository. This is to ensure everything is organized properly, and so we know what is what.
Bug fixes are split into two different categories:
- Bugs that have to be fixed ASAP should use the
hotfixbranch. The hotfix branch is created frommasteras needed, and will be deleted when merged. - Bugs that are not urgent and can wait for the next patch update should use the
patchbranch. You can commit straight to the patch branch, but it is recommended to create a new branch frompatchand then create a pull request.
You may commit directly to the patch and major branches, but you MUST always create a pull request in order to
commit into the staging or master branches.
Pull Requests
Pull requests to staging and master can only be made by core maintainers (Vicky). When creating a new pull request,
please ensure the title is prefixed with one of the following:
feature:- For featuresfix:- For bug fixeshotfix:- For hotfixesrefactor:- For refactoring
NEVER merge your own pull request, unless told by someone else.
Commit Messages
Commit messages should be as descriptive as possible, please do not do things like "Fixed bug" or "Increased price," instead, please explain what you did in the commit. For example, "Fixed issue where players could not withdraw money" or "Increased price of bread"—They don't have to be mega-descriptive, but just make sure it's clear in case we have to look back and find something later on.
Alongside this, please ensure you are using Conventional Commits. If you dont know what this is, here is a basic summary: Prefix all your commits with one of the following:
feat:- Adding new featuresfix:- When committing a bug fixrefact:- When refactoring codechore:- When doing a "grunt task"—Anything external users won't see
Code reviews
Code reviews are crucial. They help ensure that the code is of high quality and that it follows the guidelines of the project. Whenever you create a pull request, someone else will review your code to make sure it is up to a good standard.
If someone has reviewed your code and given you feedback, please make sure to address it. If you have any questions about the code, please ask in the pull request comments or reach out to someone on the team.
Code reviewers are not here to make you feel like your code is bad, or that you are a bad programmer. Please do not take any feedback in a negative way—If you feel that a comment has been left on your code that you disagree with, explain why in the comments. We are all here to help each other and make Monolith the best it can be.