github.com/pachyderm/pachyderm@v1.13.4/doc/docs/master/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      ```
    37  
    38      **System Response:**
    39  
    40      ```shell
    41      REPO     BRANCH COMMIT                           PARENT                           STARTED        DURATION           SIZE
    42      raw_data master 8248d97632874103823c7603fb8c851c 22cdb5ae05cb40868566586140ea5ed5 6 seconds ago  Less than a second 5.121MiB
    43      raw_data master 22cdb5ae05cb40868566586140ea5ed5 <none>                           33 minutes ago Less than a second 2.561MiB
    44      ```
    45  
    46  The `list commit <repo>` command displays all commits in all branches
    47  in the specified repository.
    48  
    49  The `pachctl inspect commit` command enables you to view detailed
    50  information about a commit, such as the size, parent, and the original
    51  branch of the commit, as well as how long ago the commit was
    52  started and finished. The `--full-timestamps` flag, enables you to
    53  see the exact date and time of when the commit was opened and when it
    54  was finished.
    55  If you specify a branch instead of a specific commit, Pachyderm
    56  displays the information about the HEAD of the branch.
    57  
    58  !!! example
    59      ```shell
    60      $ pachctl inspect commit raw_data@master --full-timestamps
    61      ```
    62  
    63      **System Response:**
    64  
    65      ```shell
    66      Commit: raw_data@8248d97632874103823c7603fb8c851c
    67      Original Branch: master
    68      Parent: 22cdb5ae05cb40868566586140ea5ed5
    69      Started: 2019-07-29T18:09:51.397535516Z
    70      Finished: 2019-07-29T18:09:51.500669562Z
    71      Size: 5.121MiB
    72      ```
    73  
    74  The `delete commit` command enables you to delete opened and closed
    75  commits, which results in permanent loss of all the data introduced in
    76  those commits. You can think about the `delete commit` command as an
    77  equivalent of the `rm -rf` command in Linux.
    78  It is an irreversible operation that should be used with caution.
    79  An alternative and a much safer way to revert incorrect data changes is to
    80  move the `HEAD` of the branch or create a new commit that removes
    81  the incorrect data.
    82  
    83  !!! example
    84      ```shell
    85      $ pachctl delete commit raw_data@8248d97632874103823c7603fb8c851c
    86      ```