Git Rules - samjamhen/Watermelons-soen341projectW2024 GitHub Wiki

Tables of Contents


  • main: Stable and production-ready version of our software. Can only be merged to using the PR model.
  • Samuel-Henderson: Personal branch for individual development efforts
  • Benjamin-Ho: Personal branch for individual development efforts
  • Ikram-Kamal: Personal branch for individual development efforts
  • Hanine-Kamal: Personal branch for individual development efforts
  • Yasmine-Mouatif: Personal branch for individual development efforts
  • Uyi-Oronsaye: Personal branch for individual development efforts

Creating a New Branch

To start working on a new feature or adding a new team member, follow these steps to create a new branch:

  1. Checkout Main Branch:
git checkout main
  1. Pull Latest Changes:
git pull origin main
  1. Create a New Branch:
git checkout -b branch-name
  1. Push the Branch to Remote:
git push origin branch-name

Commit Guidelines

Effective commit messages are crucial for maintaining a clear and understandable history of changes in your project. Follow these guidelines for writing informative and consistent commit messages.

Example of a Commit Message:

feat(login): Add login functionality

- Implement user authentication using JWT
- Create login form with email and password fields
- Validate user credentials on form submission
- Handle authentication errors and display appropriate messages

Fixes #123

Pull Request Process

The pull request (PR) process is essential for collaboration and code review in our project. Follow these steps to ensure smooth and effective PR management.

Creating Pull Requests

  1. When you're ready to merge your changes into the main branch, create a new pull request.
  2. Specify the source branch (your personal branch).
  3. Give your pull requests a clear and descriptive title that summarizes the changes.
  4. Provide additional information or context in the description to help reviewers understand the purpose and scope of the PR.
  5. Assign one or two reviewers to ensure thorough review of the changes made.

Merging Pull Requests

  • Once all reviews have been completed and the changes are approved, the pull request can be merged into the main branch.
  • The PR author or one of the reviewers can initiate the merge process.

Issue Tracking

Effective issue tracking is crucial for organizing, prioritizing, and managing tasks in our project. Follow these guidelines to ensure efficient issue tracking:

  1. Creating issues:
    • Use the "Issues" tab to create new user stories, tasks, or bugs.

    • Provide a detailed title and description for each issue to clearly communicate its purpose and requirements.

    • The issues are named according to the organization of the core features of the project. This structure represents a hierarchical organization of requirements, starting from a high-level feature down to specific tasks necessary for its implementation.

      For example:

      FEATURE: 3.2. CRUD operations on users
      USER STORY: U.S 3.2.1: As a system administrator, I want to CREATE new users so that I can manage access for individuals within the system.
      TASK ASSOCIATED: TASK Establish a connection between our server and MongoDB 
  2. Assigning and Prioritizing issues:
    • Assign issues to team members responsible for their implementation.
    • Prioritize issues based on their importance, urgency, and impact on project goals.
    • Use labels, milestones, and other categorization methods to organize and prioritize issues efficiently.
  3. Story points:
    • Assign points based on the estimated time or complexity of the task.
    • Use a rule such as one hour of effort equals one point to estimate the points for each issue.
  4. Closing issues:
    • Close issue when they are completed, resolved, or no longer relevant.
    • An issue can also be closed by linking a PR to the issue.