github.com/pachyderm/pachyderm@v1.13.4/doc/docs/1.9.x/concepts/data-concepts/commit.md (about) 1 # Commit 2 3 A commit is a snapshot that preserves the state of your data at a point in time. 4 It represents a single set of changes to files or directories 5 in your Pachyderm repository. Commit is a user-defined operation, which means 6 that you can start a commit, make changes, and then close the commit 7 after you are done. 8 9 Each commit has a unique identifier (ID) that you can reference in 10 the `<repo>@<commitID>` format. When you create a new 11 commit, the previous commit on which the new commit is based becomes 12 the parent of the new commit. Your pipeline history 13 consists of those parent-child relationships between your data commits. 14 15 You can obtain information about commits in a repository by running 16 `list commit <repo>` or `inspect commit <commitID>`. 17 In Pachyderm, commits are atomic operations that capture a state of 18 the files and directories in a repository. Unlike Git commits, Pachyderm 19 commits are centralized and transactional. You can start a commit by running 20 the `pachctl start commit` command, make changes to the repository, and close 21 the commit by running the `pachctl finish commit` command. After the commit is 22 finished, Pachyderm saves the new state of the repository. 23 24 When you *start*, or *open*, a commit, it means that you can make changes 25 by using `put file`, `delete file`, or other commands. You can 26 *finish*, or *close* a commit which means the commit is immutable and 27 cannot be changed. 28 29 The `pachctl list commit repo@branch` command returns a 30 timestamp, size, parent, and other information about the commit. 31 The initial commit has `<none>` as a parent. 32 33 !!! example 34 ```shell 35 $ pachctl list commit images@master 36 REPO BRANCH COMMIT PARENT STARTED DURATION SIZE 37 raw_data master 8248d97632874103823c7603fb8c851c 22cdb5ae05cb40868566586140ea5ed5 6 seconds ago Less than a second 5.121MiB 38 raw_data master 22cdb5ae05cb40868566586140ea5ed5 <none> 33 minutes ago Less than a second 2.561MiB 39 ``` 40 41 The `list commit <repo>` command displays all commits in all branches 42 in the specified repository. 43 44 The `pachctl inspect commit` command enables you to view detailed 45 information about a commit, such as the size, parent, and the original 46 branch of the commit, as well as how long ago the commit was 47 started and finished. The `--full-timestamps` flag, enables you to 48 see the exact date and time of when the commit was opened and when it 49 was finished. 50 If you specify a branch instead of a specific commit, Pachyderm 51 displays the information about the HEAD of the branch. 52 53 !!! example 54 ```shell 55 $ pachctl inspect commit raw_data@master --full-timestamps 56 Commit: raw_data@8248d97632874103823c7603fb8c851c 57 Original Branch: master 58 Parent: 22cdb5ae05cb40868566586140ea5ed5 59 Started: 2019-07-29T18:09:51.397535516Z 60 Finished: 2019-07-29T18:09:51.500669562Z 61 Size: 5.121MiB 62 ``` 63 64 The `delete commit` command enables you to delete opened and closed 65 commits, which results in permanent loss of all the data introduced in 66 those commits. You can think about the `delete commit` command as an 67 equivalent of the `rm -rf` command in Linux. 68 It is an irreversible operation that should be used with caution. 69 An alternative and a much safer way to revert incorrect data changes is to 70 move the `HEAD` of the branch or create a new commit that removes 71 the incorrect data. 72 73 !!! example 74 ```shell 75 $ pachctl delete commit raw_data@8248d97632874103823c7603fb8c851c 76 ```