Resolve merge conflicts by using natural language prompts. The provided prompts are examples that you can customize to suit your needs. The sample response varies based on the LLM that you use.
Access the DevOps Center MCP Tools
To resolve merge conflicts that occur during DevOps Center promotions, install and configure Salesforce DX MCP Server to use DevOps Center MCP tools.
Before you use the DevOps Center MCP tools, review the Salesforce DX MCP Server prerequisites and make sure that you have:
- An org with DevOps Center installed and configured
- A DevOps Center project connected to a version control system
- An IDE, such as Agentforce Vibes IDE or Visual Studio Code (VS Code), that your Salesforce admin has accepted the Terms and Conditions for
- A configured IDE project. To learn how, see Create Projects.
- An IDE installed in the same Salesforce org where your DevOps Center is installed. Connect and authenticate your IDE to this org.
- A cloned project repository open in your IDE’s workspace
- An MCP client, such as the Agentforce Vibes Extension. For setup instructions, see Set Up Agentforce Vibes Extension.
Salesforce DX MCP Server is preconfigured in Agentforce Vibes Extension. Open your IDE and turn on Salesforce DX MCP Server in Agentforce Vibes Extension. See Enable Salesforce DX MCP Server.
You interact with the server by entering natural language prompts in Agentforce. Agentforce Vibes is available from the Activity Bar and includes a chat window where you enter your prompts. For examples of prompts that you can use, see Resolve Merge Conflicts.
To use VS Code as the MCP client, see Quick Start Using the VS Code With Copilot MCP Client (Beta).
1. Detect and Analyze a Specific Conflict
- Prompt
- “Help me understand the conflict in the Admin.profile-meta.xml file.”
- How It Works
- The
detect_devops_center_merge_conflicttool analyzes a specific merge conflict to provide intelligent resolution options. In three steps, the tool:- Checks out the corresponding work item branch in your local environment
- Attempts to merge the work item branch into the target branch
- Explains the conflicts and suggests a resolution if any are detected
- Sample Response
- “I analyzed the conflict in
force-app/main/default/profiles/Admin.profile-meta.xml. Here are your options:- Take Incoming Changes: Keep the changes from the target branch and discard the work item branch’s changes.
- Take Current Changes: Keep the changes from the work item branch and override the target branch’s changes wherever conflicts occur.
- How would you like to proceed?”
2. Resolve the Merge Conflict
- Prompt
- “Resolve the conflict in Admin.profile-meta.xml by keeping the incoming changes.”
- How It Works
- The
resolve_devops_center_merge_conflicttool applies your chosen resolution strategy to the specified file. In three steps, the tool:- Reads the content of the conflicting file
- Replaces the entire conflict block with the content from your chosen strategy—in this case, the incoming changes
- Writes the modified content back to the file and stages the resolved file using
git addImportant You must commit the AI-suggested changes as a final step.
- Sample Response
- “Success! The conflict in force-app/main/default/profiles/Admin.profile-meta.xml has been resolved by accepting the incoming changes from the dev branch. The file has been staged. Please review and commit when you’re ready.”