Run Commands

Process Specific Commits

Learn how to process specific commits in a branch.

December 4, 2023

HPE ML Data Management enables you to process specific commits in a branch that are not the HEAD commit, which can be useful in many scenarios. For example, you can use this feature for:

How to Process Specific Commits #

To process a specific commit, you need to set the master branch of your repo to have your specified commit as HEAD.

For example, if you submitted ten commits in the staging branch and you want to process the seventh, third, and most recent commits, you need to run the following commands respectively:

pachctl create branch data@master --head staging^7
pachctl create branch data@master --head staging^3
pachctl create branch data@master --head staging

When you run the commands above, HPE ML Data Management creates a job for each of the commands one after another. Therefore, when one job is completed, HPE ML Data Management starts the next one. To verify that HPE ML Data Management created jobs for these commands, run the following:

pachctl list job -p <pipeline_name> --history all

How to Change the Branch HEAD #

You can move backward to previous commits as easily as advancing to the latest commits. For example, if you want to change the final output to be the result of processing staging^1, you can roll back your HEAD commit by running the following command:

pachctl create branch data@master --head staging^1

This command starts a new job to process staging^1. The HEAD commit on your output repo will be the result of processing staging^1 instead of staging.