Skip to content

Git & Workflow Conventions

Alaaddin Eren Namlı edited this page Apr 7, 2026 · 10 revisions

📖 Git & Workflow Conventions

Welcome to our project's Git Conventions guide. To ensure a clean, readable, and manageable codebase, all contributors must follow these guidelines. Consistency in our Git history helps us track changes easily, automate release notes, and collaborate efficiently.


1. Issue Tracking

Before writing any code, there should be an Issue describing the bug, feature, or task.

Issue Naming

Keep issue titles clear and concise. A good practice is to prefix the issue title with its general category, though tags/labels can also serve this purpose.

  • Format: [Type] Short, descriptive summary
  • Examples:
    • [Backend] Add Google OAuth Login
    • [Bug] Navigation menu collapses on mobile
    • [DevOps] Update React to v18

Issue Management

  • Always assign the issue to yourself before starting work.
  • Add relevant labels (e.g., frontend, bug, documentation, backend).

2. Branch Naming Conventions

All branches must be created from the main branch and should follow a strict naming convention. We use kebab-case for all branch names.

Format

type/short-description

Branch Types

Prefix Description Example
feature/ A new feature or enhancement. feature/add-payment-gateway
fix/ A bug fix for an existing feature. fix/button-alignment
hotfix/ An urgent bug fix for the production environment (branches off main). hotfix/fix-user-array-memory-leak
chore/ Maintenance, dependency updates, or tool configurations. chore/update-webpack
refactor/ Code refactoring that neither adds a feature nor fixes a bug. refactor/extract-auth-logic
docs/ Documentation-only changes. docs/update-readme-api
test/ Adding missing tests or correcting existing ones. test/user-service-coverage
ci/ Changes to CI configuration files and scripts (e.g., GitHub Actions, Docker, Jenkins). ci/setup-github-actions

3. Commit Message Conventions

We strictly follow the Conventional Commits specification. This allows us to generate changelogs automatically and easily understand the repository history.

Format

<type>(<scope>): <subject>

<body>

<footer>

Commit Types

  • feat: A new feature.
  • fix: A bug fix.
  • docs: Documentation only changes.
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc).
  • refactor: A code change that neither fixes a bug nor adds a feature.
  • perf: A code change that improves performance.
  • test: Adding missing tests or correcting existing tests.
  • chore: Changes to the build process or auxiliary tools and libraries such as documentation generation.
  • ci: Changes to CI configuration files and scripts.

Rules for the Subject Line (First Line)

  1. Use the imperative mood (e.g., "feat: add feature" not "feat: added feature" or "feat: adding feature").
  2. Do not capitalize the first letter.
  3. Do not end with a period (.).
  4. Keep it under 50 characters.

Rules for the Body (Optional but Recommended)

  1. Separate the subject from the body with a blank line.
  2. Explain what and why (not how—the code explains how).
  3. Wrap lines at 72 characters.

Example of a Perfect Commit

fix(ui): resolve overlapping text in the navigation bar

The user profile name was overlapping with the logout button on screens smaller than 768px due to absolute positioning. Updated the container to use flexbox to ensure proper spacing across all mobile viewports.

Fixes #22


4. Pull Request (PR) Conventions

A Pull Request is the final gateway before your code is merged. It should be clean, focused, and well-documented.

PR Creation Checklist

Before opening a PR, ensure you have done the following:

  • Self-Review: Review your own diffs. Remove any console.log, commented-out code, or formatting artifacts.
  • Tests: Ensure all unit and integration tests pass locally. Write new tests for new features.
  • Linting: Ensure your code passes the project's linter and formatter rules.
  • Rebase: Pull the latest changes from the target branch and resolve any conflicts locally.

PR Title Format

Our Pull Request titles must follow a specific format indicating the platform/domain and a Title Case description.

  • Format: [TASK TYPE] Title With First Letters Capitalized

  • Allowed Task Types: Backend, Frontend, Mobile, Task

  • Good Examples:

    • [Frontend] Implement Drag And Drop Functionality
    • [Backend] Update Payment Gateway Endpoint
    • [Mobile] Fix Navigation Bar Padding
    • [Task] Update Project Documentation
  • Bad Examples:

    • Added drag and drop (Missing task type and title case)
    • [frontend] implement drag and drop (Task type is not uppercase, description is not title case)

PR Description Template

Use the following Markdown template for your PR descriptions:

📝 Description

Fixes # (issue number)

📊 Type of Change

  • Bug fix
  • New feature
  • Refactoring
  • Documentation

✅ Acceptance Criteria / Checklist

  • Project builds successfully
  • I have performed a self-review
  • I have commented my code, especially in hard-to-understand areas
  • I have added/updated tests
  • All tests passed

📸 Screenshots / Recordings

⏱️ Estimated Review Time

  • < 5 min
  • 5-15 min
  • > 15 min

5. Tagging and Versioning

We use Semantic Versioning (SemVer) for tagging releases.

  • Format: vMAJOR.MINOR.PATCH
  • MAJOR: Incompatible API changes or major overhauls (e.g., v2.0.0).
  • MINOR: Adding functionality in a backwards-compatible manner (e.g., v1.2.0).
  • PATCH: Backwards-compatible bug fixes (e.g., v1.2.1).

logo Mapcess

Team Members

Final Milestone Deliverables

MVP Deliverables

Lab Reports

Communication Plan

Weekly Meetings

Sub-Group Meetings

Other Meetings

Project Documentation

RAM

Scenarios and Mock-ups

Use Case Diagrams (Initial)

Use Case Diagram (Final)

Class Diagram (Final)

Sequence Diagram (Final)

Standards & Conventions

Test & Coverage Plan

Mapping API Comparison Report

MVP Demo

Final Demo

Clone this wiki locally