Welcome! These guidelines help keep our repository organized, maintain code quality, and make collaboration smooth.
main: The stable branch that always contains release-ready code. Code merged here should be fully tested and reviewed.develop: The main development branch where all feature branches are merged once complete. The latest code under development can be found here.
Each new feature or significant change should have its own branch off develop.
Naming Convention: Use feature/<feature-name>. Example:
feature/navigation-systemPurpose: Feature branches are used to develop specific features, keeping them isolated from the main codebase. Merging: Once the feature is complete, open a pull request todevelop. See below under "Reviewing and Merging" for more information as to how.
For critical fixes in main or in develop.
Naming Convention: Use hotfix/<fix-description>. Example:
hotfix/player-name-bugPurpose: To fix bugs. Merging: Hotfixes are merged into bothmainanddevelop.
- Base Branch: Feature branches should target
develop, and hotfix branches should targetmain. - Title: Use a descriptive title that summarizes the feature or fix (e.g., "Add navigation system").
- Description: Describe what the PR does, mentioning any new files, methods, or classes added.
- Reviews: no reviews necessary since we are a small team working in close tandem with each other. Make sure to merge together when unsure or to review code together firstly.
- Merging:
- Squash and Merge: For feature branches to keep the commit history clean.
-
- Push feature branch to git, e.g. feature/navigation-system
-
- Go to GitHub repo, create a pull request (PR) for the feature branch you're on. Add title and comments and create the PR.
-
- Review the changes and at the bottom you'll see a Merge button with a dropdown arrow, press the arrow and select: "Squash and Merge" (all commits will be combined into one)
-
- Edit the commit message to say something concise like "Implement navigation system".
-
- Confirm Squash and Merge.
-
- Github will prompt to offer to delete the feature branch. Do not delete it as to keep commit tree since we don't have professional testcases in this project.
-
- Rename feature branch by adding prefix "Committed" e.g. feature/Commited-navigation-system
-
- Merge Commit: For release and hotfix branches to retain the full history.
-
- Push hotfix branch to git, e.g. hotfix/navigation-fix
-
- Create PR: base branch is for example develop or main. compare branch is the hotfix branch. Add title and description.
-
- From Merge dropdown menu, select "Create a merge commit".
-
- Confirm merge.
-
- Github will prompt to offer to delete the feature branch. Delete it to keep history clean in repo.
-
- Squash and Merge: For feature branches to keep the commit history clean.
Following these guidelines will help us keep the project organized, ensure high code quality, and make it easier for everyone to collaborate. Thank you for your contribution!