I am new to DevOps. I am using Jenkins and GitHub for salesforce deployment.


We have a develop branch. Feature branches are created out of it. When merged to develop, the deployment to the first Salesforce sandbox happens. After end of every sprint the develop branch is merged with SIT branch pushing changes to SIT Sandbox.

Problem Statement

The QA happens in the 1st sandbox for sprint 2. QA also takes place in SIT Sandbox for sprint n-1 features.

  1. If an issue is found in the SIT sandbox as part of sprint n-1 testing, the bug is fixed in the develop Sandbox
    1. a defect feature branch is created from develop.
    2. A fix is added to it.
    3. The branch is merged to develop, fix deployed to 1st Sandbox and tested.
  2. If it passes QA, the defect feature branch needs to be merged with the SIT branch to deploy the fix to the SIT sandbox and testing resumes.


Only the fix needs to be pushed to SIT before the sprint is over and not user story code from sprint 2. But if the fix is made to an apex class or object file, everything is deployed.

How would one separate the user story code from sprint 2 and defect fix code for sprint n-1 testing when merging to SIT branch?

  • 1
    hi there- what do you mean by SIT? Nov 15, 2018 at 12:11
  • SIT here refers to 2nd Salesforce Sandbox where the code needs to be deployed.
    – Dev Kamal
    Nov 16, 2018 at 13:17

1 Answer 1


This sounds like a problem for git cherry-pick. If you can separate the user story code from the fix code, by committing them separately, you can cherry pick the relevant commit to merge back into the develop branch.

See https://stackoverflow.com/questions/9339429/what-does-cherry-picking-a-commit-with-git-mean

  • git cherry-pick is not working as there are lot no of files, being committed in different commit IDs and maybe I am missing something here but getting all those commit ID and files is proving to be difficult. Is there some other Git-flow maybe to achieve this? Thanks
    – Dev Kamal
    Jan 31, 2019 at 11:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.