[SalesForce] How to link Salesforce Mavensmate project to Github as one branch per sandbox

I use mavensmate with sublime editor for salesforce project.
I was told it is a good practise to have each sandbox links to a Github branch, but wasn't told how to.

when I set up each sandbox in Mavensmate, it needs an empty folder, which means each sandbox per folder. but how could I sync each folder with a Github branch ?

The best working manner would be when I save in Sublime, it will save to my Salesforce sandbox. and when I commit the file in Sublime, it will commit to corresponding branch.

any contribution of ideas of how to manage multiple sandboxes for one project in Github will be appreciated.

Best Answer

What you can do is using a separate folder for your git folder. And for each org(sandbox) you can have a separate Mavensmate folder. You can use a integration plugin to sync between those folders. Below are the plugins I have written:

Sublime: https://github.com/Lanceshi2/SyncFileYouWant

Atom: https://github.com/Lanceshi2/SyncFileYouWant-Atom

After pulling from test org/package org, (Reverse sync), you can refresh your own org(sandbox) using either CI system or changeset. Then you can refresh your mavensmate folder by refreshing folder functionality provided by Mavensmate.

Related Topic