Git rules - pirate-games/LabRats GitHub Wiki

Git rules

To keep a clean overview of the git, and to prevent merge conflicts and errors, we created some guidelines to help.

Branching Guidelines

When creating branch names, adhere to the following conventions:

Word Separation:

  • Utilize hyphens (-) to separate words in the branch name.

Capitalization:

  • Avoid capital letters in branch names.

Start with Category Words:

  • Initiate the branch name with category words that provide context. (such as f for feature or b for bug)

Conciseness:

  • Keep branch names short and concise for clarity and brevity.

Branching Structure:

  • h- hotfix, for promptly addressing critical issues, typically employing temporary solutions.
  • b- bugfix, for resolving identified bugs in the codebase.
  • f- feature, for introducing, removing, or modifying a specific feature.
  • t- testing, for experimenting with non-issue-related elements.

Branching best practices

  • Base on Development Branch:
    • Only create new branches based on the development branch to maintain code integrity.
  • Permissions:
    • Seek permission from the branch owner before using another branch. Utilize branches from the system that works effectively.

Pull requests

  • When creating a pull request we don’t squash the commits in order to keep the commit messages.
  • When a pull request is made, the lead developer reviews the code before pulling.

Example branch names

f-player-movement

t-new-multiplayer-environment

Sources

C# coding conventions

https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/coding-style/coding-conventions

Unity naming conventions

https://unity.com/how-to/naming-and-code-style-tips-c-scripting-unity

Git naming conventions source:

https://tilburgsciencehub.com/building-blocks/collaborate-and-share-your-work/use-github/naming-git-branches/