Pull/Merge from Git to Salesforce Sandbox

71 views
Skip to first unread message

George...@domain.com.au

unread,
Dec 12, 2017, 5:47:32 PM12/12/17
to Force.com Development General Discussion
Hi all,

Is there a way we can automate IlluminatedCloud to automatically save to server all the files that have been Pulled/Merged from Git branch?

Scenario:

I am working on class A, some other developer is working on class B. They commit and merge to develop branch in Git. When I finish with class A, I am doing a Pull to check for conflicts before I push class A to the branch. All is good so I proceed. However, my sandbox does not have the latest changes (i.e. class B). I have to manually open class B and click Save before it is saved to my sandbox. 

Ideally the aim is to also update the sandbox whenever there is a pull. Is this possible?

G.

sc...@illuminatedcloud.com

unread,
Dec 12, 2017, 10:35:34 PM12/12/17
to Force.com Development General Discussion, George...@domain.com.au
Hi, George. Does Deploy Modified Metadata not do what you want? It should send the created and updated files over, though it won't take into account removal from the VCS update.

A variation on this idea has been submitted as an enhancement request here:


Feel free to add the details of this use case to that issue if you'd like, or feel free to create a new one one if yours is different enough.

Regards,
Scott Wells
Message has been deleted
Message has been deleted

George Nguyen

unread,
Dec 14, 2017, 6:55:57 PM12/14/17
to sc...@illuminatedcloud.com, Force.com Development General Discussion
Hi Scott,

Unfortunately that is what I thought that menu was going to do but it doesn't seem like it does.

Here is what I did:
  1. Created a new branch from the develop branch. 
  2. Checkout the new branch onto IntelliJ
  3. Checked and confirmed that I have all the latest changes both in Git and Salesforce.
  4. Went into Github and updated one of the classes (simulating another developer's committed changes). 
  5. Back in IntelliJ, I Update the project (VCS > Update Project). 
  6. Then Project > IlluminatedCloud > Deploy Modified Metadata. In the popup it does show me the modified file (fetched from Git). I clicked Deploy
  7. Got confirmation that Deployment is Complete.
  8. Logged into my Sandbox and opened the file. Changes were not deployed... 
  9. If I open the file in InterlliJ and then Ctrl+S, it deploys it successfully. 
Is this a bug with IlluminatedCloud?

cheers,

George Nguyen

George Nguyen

unread,
Dec 14, 2017, 7:19:43 PM12/14/17
to sc...@illuminatedcloud.com, Force.com Development General Discussion
Actually I found the issue. 

Even though the project folder contains the package.xml, IlluminatedCloud does not take it into account unless you set it as the Subscription of the Module. 

In the project explorer I had the package.xml which contained all the metadata that I thought would have been used to pull/push changes to SF (coming from Eclipse as you can tell). 

I checked again in the IlluminatedCloud > Modules and it only had Pages and no Classes. Once I have changed to ALL (or selected the package.xml from the src folder) and then did Deploy Modified Metadata it worked. 

I hope this post will help someone else with the same misconception.

😁


cheers,

George Nguyen
Reply all
Reply to author
Forward
0 new messages