Add contextual option to deploy a commit to an org

Issue #2638 open
Nochum Sossonko created an issue

In situations where a team member commits changes to the main branch while another team member is working on a feature branch, there may be a need to sync up the branches. When this is done, there’s no simple way to deploy all the changes to a developer/sandbox org to bring it up-to-date.

It would be nice if such a feature existed.

Comments (5)

  1. Scott Wells repo owner
    • changed status to open

    I apologize but I'm not sure that I follow. Both Deploy Modified Metadata and Push Metadata should bring an org up-to-date with regard to local project changes after merging and reconciling banches. Note that Deploy Modified Metadata doesn't perform removals, so those must be applied explicitly. If you're requesting something other than what those actions do, can you please specify the differences?

  2. Nochum Sossonko reporter

    Essentially, if I wanted to “cherry-pick” a commit and deploy it to my org. Or even a group of commits.

    Happens a lot with my teams, and sometimes I can’t take all the commits and just deploy them. I guess it might be a bit of a narrow request.

  3. Scott Wells repo owner

    Ah, I see. Yes, that’s different if you’re wanting to use a specific commit or set of commits for file context. I see that clearly now in what you’ve requested. Apologies for my initial confusion. This seems like a specific use case for what’s been requested in #745 where one or more commits represents the “scope”.

    It turns out that you can do this now, at least with a single commit. In the IDE’s Git tool window under the Log tab, choose the current branch and then select a specific commit to that branch that you’d like to deploy. On the right-hand side of the selected commit, you’ll see a tree of files involved in that commit. If you select the root node (or any sub-node) of that tree, you can then use Deploy Modified Metadata with Contents = Context to deploy whatever subset of those files are out-of-date, or Deploy All Metadata to deploy all files from that commit unconditionally.

    Note that this same “trick” works almost anywhere that there’s a “files” context, e.g., VCS changelists.

  4. Nochum Sossonko reporter

    That’s definitely interesting, and I can confirm it works. Very hard to find feature though 🙂

  5. Scott Wells repo owner

    It’s not really a feature as much as a fortunate side-effect of how Context works. That’s why #745 is still around – and in spite of the old issue number, still very much on my TODO list – so that this kind of thing becomes more first-class. But…I’m glad that should work for you as a workaround in the interim.

  6. Log in to comment