This is how you can manage GitHub Branches and PRs

Published on: November 08, 2024

This is how you can manage GitHub Branches and PRs

Branches Creation

  • New Feature 
    • example: You create new CRUD APIs for blogs
    • ft/task-shortened-name (ft/blog-crud)
      • branch out from staging always, unless it is specified which branch
      • branch out from a dependant feature branch, if the old feature is still not merged
  • Bugfix 
    • If a feature PR is already merged to the staging branch, but there are some bugs that need to be fixed
    • fix/feature-001, branch out from staging, unless it is specified
  • Hotfix
    • If a feature has a bug, but it’s already deployed to production, but it’s crashing and needs to be fixed immediately
    • hotfix/fix-name-001, branch out always from master / main

Pull Request

  • Always rebase your PR from the branch that you branched out
  • Once the task is completed, raise a PR (pull request) 
    • In the PR, attach the list of tasks (link to it)
    • Attach a screenshot or a screen recording to the PR for more clarity and making sure it's easier to address any issues
    • Add your lead as a Reviewer to your PR

Made with Mevin.ai