-
Notifications
You must be signed in to change notification settings - Fork 0
Git Ground‐Rules
Corvin Koegler edited this page Jun 11, 2024
·
1 revision
-
Protected
main
Branch: Themain
branch is protected and can only be modified through pull requests that require approval from multiple developers. This ensures that changes are reviewed before being integrated. -
Frequent Merges: Merge changes into
main
regularly to keep it up to date. This minimizes merge conflicts and ensures that all branches are based on the latest code. - Review Process: Ensure that pull requests are thoroughly reviewed. Look for code quality, adherence to coding standards, and potential bugs.
This may change if dev
and/or test
branches are added.
-
Long-Lasting Branches: The
main
branch is the only persistent branch currently. Direct commits tomain
are prohibited; all changes must go through reviewed pull requests. -
Additional Branches: If the project grows, consider adding:
-
dev
for granular changes that should not go directly intomain
(and the users’ hands). -
test
for running automated tests and merging changes automatically at specific intervals.
-
- Avoid Excessive Branching: Limit the creation of temporary branches. Focus on keeping the branch structure simple and clean.
-
Branch Naming Conventions: Use descriptive names for branches that reflect their purpose. Stick to kebab-case for naming. Examples include:
-
enhancement/branch-name
for new features. -
bug/something-broke
for bug fixes.
-
- Branch Cleanup: Delete branches once they are merged to keep the repository tidy.
- Descriptive Titles: Each commit should have a short, descriptive title summarizing the changes made. This helps others understand the commit at a glance.
- Small and Frequent Commits: Commit often with small, manageable changes. This makes it easier to track changes and identify issues.
- Commit Messages: After the short title, add a blank line followed by a more detailed description if necessary. Use this space for additional context, explanations, and Squeak tags like Co-Authors.
- Atomic Commits: Ensure each commit represents a single logical change. Avoid mixing unrelated changes in a single commit.
- Issue Tracking Integration: Reference related issue numbers in commit messages and pull requests. This provides context and links changes to specific tasks or bug reports. This is still a TODO
-
Rebase and Squash: When necessary, use rebase and squash to clean up commit history before merging. This helps maintain a clear and concise history in
main
. - Code Consistency: Ensure that code follows consistent styles and conventions throughout the project. Use pre-commit hooks to enforce coding standards. This is still a TODO
- Conflict Resolution: Resolve merge conflicts promptly. Communicate with team members to understand the changes and ensure that conflicts are resolved correctly.
- Documentation Updates: When making significant changes, update relevant documentation. This includes README files, code comments, and any other project documentation. Keep most of the documentation in this wiki. The README should include a short overview of the project including screenshots.