Development Best Practices
  • Home
  • Clean Code
  • Apex
    • Naming Conventions
    • Triggers
    • Unit Testing
    • Principles
      • KISS
      • DRY
      • Single Responsibility
      • Open/Closed
      • YAGNI
    • Patterns
    • SOQL
    • Exception Handling
    • Magic Strings
  • Lightning Components
    • Aura
    • LWC
  • Automation
    • Process Builder
  • Salesforce DX and VSCode
  • Git Source Control
    • Install Git
    • Using Git
    • Development Workflow
      • The Rules
    • Feature Branch Workflow
Powered by GitBook
On this page
  • Overview
  • New Feature Branch
  • Other Frequent Commands
  1. Git Source Control

Feature Branch Workflow

WIP

Overview

This page is a work in progress and yet to be fully confirmed/tested.

New Feature Branch

  • Checkout UAT branch:

    • git checkout uat

  • Create & checkout feature branch from UAT branch:

    • git checkout -b <feature-branch>

  • Makes changes to files (e.g. in VS Code), add & commit:

    • git status

    • git add <some-file> OR git add --all

    • git commit -m <commit-message>

  • Merge other branches into local (as required) & resolve conflicts:

    • TBC

  • Push to Remote (and track branch):

    • git push -u origin <feature-branch>

  • Pull Request to UAT:

    • Do this through the GitHub UI (make sure the source is the feature branch and the target is UAT).

  • Review & Merge:

    • Do this through the GitHub UI.

  • Delete Feature Branch (optional/typical)

    • Do this through the GitHub UI

  • Delete from local (only if already merge):

    • git branch --delete <feature-branch>

Other Frequent Commands

  • git status

  • git branch -a

  • git fetch

  • git pull

  • git restore <some-file>

  • TBC: git remote prune origin

PreviousThe Rules

Last updated 5 years ago