Skip to content

๐ŸŒฟ Git Workflow

Divyansh Bhardwaj edited this page Oct 8, 2025 · 1 revision

Branch Naming Convention

<type>/<description>

Types:
- feature/  : New features
- bugfix/   : Bug fixes
- hotfix/   : Urgent production fixes
- refactor/ : Code refactoring
- docs/     : Documentation updates
- test/     : Adding/updating tests
- chore/    : Maintenance tasks

Examples:
feature/note-editor
bugfix/search-not-working
refactor/storage-service
docs/update-readme
test/add-button-tests

Commit Message Convention

Follow Conventional Commits:

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

<body>

<footer>

Types

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation changes
  • style: Code style changes (formatting, no logic change)
  • refactor: Code refactoring
  • test: Adding or updating tests
  • chore: Maintenance tasks

Examples

feat(auth): implement login functionality

- Add LoginForm component
- Add authentication service
- Add tests for login flow

Closes #123

---

fix(search): resolve case-sensitive search issue

The search was not working with uppercase letters.
Now it converts search query to lowercase.

Fixes #145

---

test(ui): add tests for Button component

- Test rendering with different variants
- Test click handlers
- Test disabled state

Pull Request Workflow

1. Create Feature Branch

git checkout -b feature/note-editor

2. Make Changes with TDD

# Write tests
npm run test:watch

# Implement feature
# Commit regularly

git add .
git commit -m "feat(notes): add rich text editor component"

3. Push to Remote

git push origin feature/note-editor

4. Create Pull Request

Use the PR template below:

## Description
Brief description of what this PR does.

## Type of Change
- [ ] New feature
- [ ] Bug fix
- [ ] Refactoring
- [ ] Documentation update
- [ ] Test addition/update

## Changes Made
- Change 1
- Change 2
- Change 3

## Testing Done
- [ ] All tests pass
- [ ] Added new tests
- [ ] Manual testing completed

## Screenshots (if applicable)
Add screenshots here

## Related Issues
Closes #issue_number

## Checklist
- [ ] Code follows project style guidelines
- [ ] Self-review completed
- [ ] Comments added for complex logic
- [ ] Documentation updated
- [ ] No console.log or debugging code
- [ ] All tests passing

5. Code Review Process

For Reviewers:

  • Check code quality and style
  • Verify tests are comprehensive
  • Test functionality locally
  • Provide constructive feedback
  • Approve when satisfied

For Authors:

  • Address all comments
  • Push fixes to same branch
  • Re-request review
  • Merge after approval

6. Merge Strategy

# After approval, use squash and merge
# This keeps main branch history clean

Code Review Checklist

Functionality

  • Code works as intended
  • Edge cases handled
  • Error handling present
  • No hardcoded values

Code Quality

  • Follows project conventions
  • DRY principle followed
  • Functions are small and focused
  • Clear variable/function names
  • No commented-out code

Testing

  • Tests present and passing
  • Tests cover main scenarios
  • Tests follow TDD principles
  • No skipped tests

Performance

  • No unnecessary re-renders
  • Efficient algorithms used
  • No memory leaks

Accessibility

  • Semantic HTML used
  • ARIA labels present
  • Keyboard navigation works
  • Color contrast sufficient

Documentation

  • Complex logic documented
  • README updated if needed
  • Props/types documented
Clone this wiki locally