Salesforce teams face code clobbering and loss of metadata due to complex sandbox strategies. Git solves this with backup and merge conflict handling. Blue Canvas offers automatic syncing and 1-click conflict resolution for faster development.
With this article, learn how using Git for Salesforce can solve code clobbering and handle merge conflicts seamlessly. Also discover Blue Canvas in practice: a simple and automatic Git implementation for Salesforce that can help with merge conflict detection and resolution.
Here are 5 Key Takeaways from this blog:
- Git is a great tool for Salesforce developers because it provides a backup of every change and the ability to revert to previous snapshots of your code base.
- Git is designed to handle merge conflicts, which can be a common issue when multiple people are working on multiple features in multiple sandboxes.
- Blue Canvas is a simple and automatic Git implementation for Salesforce that can help with merge conflict detection and resolution.
- With Blue Canvas, every change is automatically committed into Git continuously, ensuring that even quick declarative or UI based changes to Workflows or Fields get added into the Git repo.
- Automatic merge conflict detection allows Salesforce developers to move much faster and focus on building great tools instead of managing spreadsheets. Learn more about Merge Conflict Resolution functionality.
FREE TOOL
Profiles & Permissions Deployer
Easily compare and deploy Profiles, Permission Sets, and Field-Level Security (FLS) between any two Salesforce organizations.
Get Started
Made with love by the Blue Canvas team ❤️
Code clobbering is a pain. But as Salesforce sandbox strategies get increasingly complex it can be difficult to avoid. Many teams have multiple people working on multiple features in multiple sandboxes. Some resort to spreadsheets to manage the chaos. But still, even with spreadsheets, it can be all too easy to push a change set that overwrites the code of a colleague or causes you to lose some important metadata. One team we work with lost nearly 6-months of developer time due to an inadvertent push to a sandbox. They had no source control and no backup of their Salesforce code . This can costs tens of thousands of dollars .
Git is wonderful because it solves code clobbering. First of all it gives you a complete backup of every change and the ability to revert to previous snapshots of your code base. So whenever you push a change, all is not lost. Instead you have a continuous history of who is changing what and when .
But Git is also designed to specifically handle merge conflicts. Because Git keeps a comprehensive history, it can detect when changes happen in one branch that conflict with changes in another. When you go to merge these branches, instead of just overwriting one with the other, Git raises its hand and asks “Are you sure?” Even more useful, Git will show you the exact lines of code that are different and let you “resolve” the conflict by selecting which you want to use.
One of the best things about using Git for Salesforce is that you can handle merge conflicts seamlessly and combat the tendency for work done on one sandbox to overwrite the work done on another (Note: You can even sometimes overwrite yourself! We have heard stories of one person teams overwriting work that they made on a previous sandbox accidentally).
Because Blue Canvas is a simple, automatic, easy to use Git implementation for Salesforce, it makes handling merge conflicts very simple.
Automatically Sync all Salesforce Changes to Git With Blue Canvas, every change is automatically committed into Git continuously . This ensures that even quick declarative or UI based changes to Workflows or Fields get added into the Git repo. This happens whether it’s a sandbox or production. And it’s crucial because it allows Git to do it’s job. Without automatic syncing you might have certain types of metadata slip through the cracks.
Resolved Merge Conflicts with 1 Click If a change occurs in two connected orgs, Blue Canvas will detect this and notify you when you try to merge the branches.
.ap3w-embeddable-form-6491c5ce2060226781d5c909{box-sizing:content-box;width:100%;font-size:16px;max-width:850px;max-height:100%;overflow:auto;background-color:#f4f6fb;border:2px solid transparent;box-shadow:0 0 10px 3px rgba(0,0,0,0);z-index:unset}.ap3w-embeddable-form-6491c5ce2060226781d5c909:before{content:' ';display:block;position:absolute;pointer-events:none;left:0;top:0;width:100%;height:100%;opacity:0%;background-image:url();background-position:center center;background-size:cover;background-repeat:no-repeat}.ap3w-embeddable-form-content{margin:auto;padding:32px}.ap3w-embeddable-form-6491c5ce2060226781d5c909-rounded{border-radius:12px}.ap3w-embeddable-form-6491c5ce2060226781d5c909 .ap3w-text{margin-bottom:16px}.ap3w-embeddable-form-6491c5ce2060226781d5c909 .ap3w-text *{padding-bottom:5px}.ap3w-text-6491c5ce2060226781d5c909{position:relative;margin:0;margin-bottom:16px;word-wrap:break-word}.ap3w-text-6491c5ce2060226781d5c909 *{margin:0;padding-bottom:8px}.ap3w-text-6491c5ce2060226781d5c909 p{text-transform:unset;text-decoration:unset;text-indent:unset}.ap3w-text-6491c5ce2060226781d5c909 p[data-size="h1"]{font-family:Hind,Helvetica;font-size:30px;line-height:1.2;color:#433efe;font-weight:700;font-style:normal}.ap3w-text-6491c5ce2060226781d5c909 p[data-size="h2"]{font-family:Hind,Helvetica;font-size:20px;line-height:1.2;color:#433efe;font-weight:700;font-style:normal}.ap3w-text-6491c5ce2060226781d5c909 p[data-size="h3"]{font-family:Hind,Helvetica;font-size:20px;line-height:1.2;color:#433efe;font-weight:700;font-style:normal}.ap3w-text-6491c5ce2060226781d5c909 p[data-size="h4"]{font-family:Hind,Helvetica;font-size:16px;line-height:1.2;color:#433efe;font-weight:700;font-style:normal}.ap3w-text-6491c5ce2060226781d5c909 p[data-size="h5"]{font-family:Hind,Helvetica;font-size:14px;line-height:1.2;color:#433efe;font-weight:700;font-style:normal}.ap3w-text-6491c5ce2060226781d5c909 p[data-size="h6"]{font-family:Hind,Helvetica;font-size:14px;line-height:1.2;color:#433efe;font-weight:700;font-style:normal}.ap3w-text-6491c5ce2060226781d5c909 p{font-family:Hind,Helvetica;font-size:16px;line-height:1.2;color:#333333;font-weight:400;font-style:normal}.ap3w-text-6491c5ce2060226781d5c909 p[data-size="large"]{font-family:Hind,Helvetica;font-size:20px;line-height:1.2;color:#333333;font-weight:400;font-style:normal}.ap3w-text-6491c5ce2060226781d5c909 p[data-size="small"]{font-family:Hind,Helvetica;font-size:14px;line-height:1.2;color:#333333;font-weight:400;font-style:normal}.ap3w-text-6491c5ce2060226781d5c909{position:relative;margin:0;margin-bottom:16px;word-wrap:break-word}.ap3w-text-6491c5ce2060226781d5c909 *{margin:0;padding-bottom:8px}.ap3w-text-6491c5ce2060226781d5c909 p{text-transform:unset;text-decoration:unset;text-indent:unset}.ap3w-text-6491c5ce2060226781d5c909 p[data-size="h1"]{font-family:Hind,Helvetica;font-size:30px;line-height:1.2;color:#433efe;font-weight:700;font-style:normal}.ap3w-text-6491c5ce2060226781d5c909 p[data-size="h2"]{font-family:Hind,Helvetica;font-size:20px;line-height:1.2;color:#433efe;font-weight:700;font-style:normal}.ap3w-text-6491c5ce2060226781d5c909 p[data-size="h3"]{font-family:Hind,Helvetica;font-size:20px;line-height:1.2;color:#433efe;font-weight:700;font-style:normal}.ap3w-text-6491c5ce2060226781d5c909 p[data-size="h4"]{font-family:Hind,Helvetica;font-size:16px;line-height:1.2;color:#433efe;font-weight:700;font-style:normal}.ap3w-text-6491c5ce2060226781d5c909 p[data-size="h5"]{font-family:Hind,Helvetica;font-size:14px;line-height:1.2;color:#433efe;font-weight:700;font-style:normal}.ap3w-text-6491c5ce2060226781d5c909 p[data-size="h6"]{font-family:Hind,Helvetica;font-size:14px;line-height:1.2;color:#433efe;font-weight:700;font-style:normal}.ap3w-text-6491c5ce2060226781d5c909 p{font-family:Hind,Helvetica;font-size:16px;line-height:1.2;color:#333333;font-weight:400;font-style:normal}.ap3w-text-6491c5ce2060226781d5c909 p[data-size="large"]{font-family:Hind,Helvetica;font-size:20px;line-height:1.2;color:#333333;font-weight:400;font-style:normal}.ap3w-text-6491c5ce2060226781d5c909 p[data-size="small"]{font-family:Hind,Helvetica;font-size:14px;line-height:1.2;color:#333333;font-weight:400;font-style:normal}.ap3w-form-input-6491c5ce2060226781d5c909{position:relative;margin-bottom:20px}.ap3w-form-input-6491c5ce2060226781d5c909 input{margin-top:8px;box-sizing:border-box;width:100%;background-color:#FFFFFF;border:1px solid #000000;color:#000000;outline:none;font-family:Hind,Helvetica;font-weight:400;font-style:normal;font-size:16px;line-height:1.2;padding:10px 16px;resize:none;border-radius:4px}.ap3w-form-input-6491c5ce2060226781d5c909 .ap3w-form-input-label{font-weight:bold;color:#000000;font-family:Hind,Helvetica;font-size:16px;line-height:1.2}.ap3w-form-button-6491c5ce2060226781d5c909 button{position:relative;cursor:pointer;padding:10px;font-weight:bold;outline:none;border:2px solid transparent;color:#ffffff;background-color:#01b272;font-family:Hind,Helvetica;font-size:16px;line-height:1.2;border-radius:4px;flex:1}
Blue Canvas even includes a slick user interface for handling the merge conflict. It will show you what is present in each org and let you quickly select which version you want to use with the click of a button (or custom edit the file if you prefer). This works with both code and declarative changes:
You can then resolve these conflicts and continue with your deployment.
Move Faster with Merge Conflict Detection Automatic merge conflict detection allows Salesforce developers to move much faster. When you trust your source control and CI system to catch merge conflicts, you can drop the spreadsheets and focus on actually building great tools. To gain access signup at https://bluecanvas.io .
Try bluecanvas now!
Start your 14-day trial!
Get Started
Made with love by the Blue Canvas team ❤️