Branch Overwrite Protection

Overwrite Protection is a safeguard process that runs against a Salesforce org to prevent accidental overwrites of metadata.

Overwrite Protection compares your branch components with the live org components and highlights what’s new, different, or the same.

This ensures you don’t unknowingly overwrite critical metadata in your org during a deployment.

How to Run Overwrite Protection

  1. Open the branch where you want to run the check.

  2. Click the three dots (⋮) menu in the branch header and choose Overwrite protection from the dropdown.

  3. The Overwrite Protection page opens.

Step 1: Select connection

  • Pick a Salesforce org (connection) where you want to check for overwrites.

  • You can search by name, filter by Org type, Created by, or sort by Latest activity.

  • Once selected, click Next.

Step 2: Select components

  • A list of branch components appears.

  • Use filters to narrow down: component type, latest activity, SF updated by, or SF updated date.

  • Click Add for specific components, or use Add all at the top to include everything.

  • When ready, click Run.

You’ll see a confirmation message: “Overwrite protection ran successfully.”

Checking Status

  • Go to the Activities tab in your branch.

  • Overwrite Protection jobs appear under Jobs with statuses like:

    • Queued

    • In Progress

    • Completed

    • Exception

  • You can filter jobs by type, status, or date range.

  • Click the job entry to see detailed logs.

How to View Results

Once the check completes, you’ll land on the Overwrite protection result page. Here you’ll see:

  • New components → exist in branch but not in the org.

  • Different components → exist in both, but contents differ.

  • Same components → no changes detected.

Each component is tagged with its status (New, Different, Same).

Resolving Differences

  • For items marked as Different, click Resolve.

  • A side-by-side diff view opens:

    • Incoming → branch version.

    • Current → org version.

  • You can:

    • Accept all → take all incoming changes.

    • Reset all changes → keep the current org version.

    • Or review line-by-line and choose what to keep.

  • Once resolved, click Commit changes.

  • The status updates, and the resolved component moves into the branch history.

Handling New and Same Components

  • New components: these can usually be committed safely since they don’t exist in the org yet. Simply include them in your commit.

  • Same components: no action is needed — they’re already identical between branch and org.

How to View Logs

  1. Open the branch → Activities → Jobs

  2. Click the Overwrite Protection job that shows Completed

  3. You’ll land on the Overwrite protection result page

  4. Click See logs (top-right) to open the execution logs

Best Practices

  • Always run Overwrite Protection before deploying to production or critical environments.

  • Focus on Different components — review carefully before deciding which version to keep.

  • Use meaningful commit messages when finalizing resolutions, so your team can track the reason for changes.

  • Resolve conflicts in the Overwrite Protection UI instead of skipping — this keeps your branch and org in sync.

  • If the job fails or ends with an Exception, check the logs immediately and rerun once fixed.

  • Combine Overwrite Protection with Pre-Deploy Fix to catch both overwrites and missing dependencies before deployment.

Last updated

Was this helpful?