I am trying to start to work with Git in my new project. I know the workflow and git processes.

This is my scenario and my doubt.

  1. Create a new project in Sublime-Mavensmate and initialize Git.
  2. Create an apex class 'Test', add and commit to git (version 1). Cmd + S and then autosave in my salesforce sandbox org.
  3. Modify this apex class 'Test', add and commit to git (version 2). Cmd +S and autosave in sandbox org.
  4. With Git I rollback to version 1 and then open sublime Text. I can watch the version 1 of my apex class but in my org I have the version 2. If I use 'Refresh from server' I loss my version 1.

What is the procedure to sincronize this process? In this case is only one class but could be more.

1 Answer 1


The answer to this question is highly dependent on personal opinion. My suggestions are:

1, You can use two different folders to keep mavensmate project and git project. In that way, anything changed in your Mavensmate folder don't directly update your git folder. And you can take the decision on what to sync. And you can use my sublime plugin to sync between the two folders: https://packagecontrol.io/packages/SyncFileYouWant

2, If you want your git build immediately update your folder for each commit, consider using a CI tool. E.g. jenkins.

3, Or otherwise, after each revert, manually save your file to server, which is the easiest option. And I can't blame it.

  • It is the only way? :(. Right now I do not use a CI tool Nov 12, 2015 at 9:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .