I am setting up our Saleforce GIT repo and trying to plan out a solid workflow, but I'm unsure how to make it work with the Sublime Text 3: Salesforce IDE plugin (Refactored to HaoIDE) because it creates a separate (uniquely named) project folder (based on a package.xml file).
My first thought was to have to branches, one for production and one for development/sandbox, and then I would create bug and feature branches from the development branch (which represents my sandbox environment). For example:
production o-------o---------------------------------------------------o----------
\ /
development o-------o----------------o------------o---------o
\ \ / /
new-feature \ o--------------o----------o
\ /
hotfix o-------------o
The plugin has a settings file setup like this:
"projects":
{
"Production":
{
"allowed_packages":
[
],
"default": false,
"login_url": "https://login.salesforce.com",
"password": "********",
"production": "https://login.salesforce.com",
"sandbox": "https://test.salesforce.com",
"security_token": "Ucv1d984sdfbbg64py",
"username": "[email protected]"
},
"Sandbox": <<---- These cannot be the same, i.e. "Project-Name"
{
"allowed_packages":
[
],
"default": true,
"login_url": "https://test.salesforce.com",
"password": "********",
"security_token": "h94jhjhyn98bvtre7wg4ewtrh",
"username": "[email protected]"
}
},
"workspace": "C:/projects/salesforce"
So with this setup my repo would have two separate folders. With 2 folders I can never actually merge one into the other. One additional thought I had was to make orphan branches so that each branch only has 1 folder but I'm not sure how this would look long term considering I still can't merge one branch into the other.
Note: Once the package.xml
is loaded and the packaged is downloaded both the Production and Sandbox folders will have a .config
folder with settings specific to the environment they're connected to which I forsee causing more issues so I plan to add .config
folder to the .gitignore
file
Production
andSandbox
folders even though they both represent the same codebase, does that make sense?