Building14% of the exam

Git branching, merging and commit practices

How to fit a Git branching model to team size and release cadence, when long-lived environment branches earn their place, how merge, rebase, revert, amend and reset change history, and which commit habits keep a Salesforce repository reviewable and auditable.

Official exam objective
Given a customer scenario, explain how source control branching/versioning/merging can be used and recommend appropriate strategies.

~8 min read · 11 practice questions ·

What the exam expects

  • Recommend a branching model (GitHub flow with short-lived feature branches, GitFlow or trunk-based) from team size, release frequency and process tolerance.
  • Decide when long-lived environment branches are justified, and how a Lifecycle Center (formerly DevOps Center) pipeline maps stages to branches.
  • Predict what a merge, fast-forward or rebase does to history, and resolve a conflict without losing either side's work.
  • Pick the safe way to undo or tidy commits: git revert for pushed work, commit --amend and reset --soft only before pushing.
  • Set commit, line-ending and ignore-file practices that make pull requests readable and history auditable.

Key terms: short-lived branch (created for one function and deleted once merged), recursive merge (creates a merge commit because the target moved on), fast-forward merge (moves the target tip; no merge commit), rebase (reapplies a branch's commits on a new base, rewriting history), atomic commit (one small, logical unit of change).

Key facts

Fast-forward condition
Detail
Target has no new commits since the branch was created; no merge commit
Rebase
Detail
Reapplies commits after the target's last commit; rewrites history
Pushed commit to undo
Detail
Use git revert; amend and reset only before pushing
Line endings
Detail
core.autocrlf true on Windows, input on Mac or Linux
Failed promotion deploy
Detail
Merge not finalized; all branches stay as before
Partial release in a stage
Detail
Custom promotion of selected approved work items
Unfinished high-risk work
Detail
Deploy disabled behind a custom metadata type or custom setting flag
Sources for this section (4)
  • Why is git revert the right undo for a commit others have already pulled?
  • When does merging a pull request create a merge commit?
  • When does a long-lived branch make sense?
  • Which reset mode lets you squash several unpushed commits into one?

The questions are free to read. Answers with their sources and self-grading are included with the pack.

Keep reading with the Platform Development Lifecycle and Deployment Architect pack

  • Core concepts
  • Exam traps
  • Worked scenario

The pack includes:

  • All 26 lessons of the Platform Development Lifecycle and Deployment Architect guide, with reading progress
  • Interactive decision walks and step-by-step sequence steppers
  • Inline practice questions and one-click topic practice (11 questions for this lesson)
  • An official source cited for every claim
  • An AI tutor that answers from the guide
  • Unlimited timed practice exams

Practice for the Platform Development Lifecycle and Deployment Architect exam