Gitflow - spookyboy2000/SproutScape GitHub Wiki

Gitflow Guide for SproutScape

This document outlines the Gitflow process for managing version control within our project using Git, including branching strategies, naming conventions, pull requests, conflict resolution, and asset management.

Branching Strategy

We use the following three main branches:

  • main: The main branch where the final, stable version of the code resides.
  • Art: A separate branch for art-related changes (assets, textures, etc.).
  • Development: A branch for developers to work on their individual features and changes.

Workflow:

  • Each developer works in their own Developer folder within the Development branch.
  • Art and Development are merged periodically to combine changes from both branches.
  • Once everything is reviewed and ready, the changes are merged into main (except for the Development folder content).

Branch Naming Conventions

  • main: Final, production-ready version.
  • Art: Branch dedicated to art-related changes.
  • Development: Branch where individual developer work happens.

Pull Requests (PRs)

  • We use pull requests for all merges into the branches.
  • A PR template must be filled out to ensure all relevant details are provided (e.g., what was changed, why, etc.).
  • Code review: PRs are reviewed by the designated reviewer (usually the person responsible for managing the codebase).
  • Approval: Once reviewed and approved, the PR is merged into the corresponding branch.

Conflict Resolution

  • Merge conflicts are typically handled by the responsible reviewer (usually the project lead or the person managing the repository).
  • Conflicts are resolved manually, and the changes are re-tested before being merged.

Release Management

  • For now, the main branch serves as the base for releases.
  • In the future, we plan to create release branches from main to maintain stable versions that won't be affected by ongoing development changes.

File Management

Files to be Committed:

  • Only commit necessary files, such as:
    • Code
    • Art assets (except those handled outside Git, like large files)

Files Excluded from the Repo:

  • Files listed in .gitignore:
    • Binaries/
    • DerivedDataCache/
    • Intermediate/
    • Saved/
    • .vscode/
    • .vs/
    • *.VC.db
    • *.opensdf
    • *.opendb
    • *.sdf
    • *.sln
    • *.suo
    • *.xcodeproj
    • *.xcworkspace

These files are excluded to keep the repository clean and avoid unnecessary bloat.

Conclusion

This Gitflow process ensures that we maintain a clean and organized version control workflow, allowing for smooth collaboration between developers and artists. We handle conflicts as needed, and pull requests ensure that all code changes are reviewed and approved before being merged into a branch.

For any additional questions, please refer to the project documentation here.