![Forrest logo](/images/logo.png)
dolt-commit:tldr:35939
The "dolt commit" command is used to save changes made to a Dolt repository.
When you make changes to the data in the Dolt repository, such as inserting, updating, or deleting rows in tables, those changes are not automatically saved. They are kept in a staging area where you can review and modify them before committing them to the repository.
To commit the changes, you need to run the "dolt commit" command. This command creates a new commit that represents a snapshot of the changes made to the repository. The commit includes a commit message that describes the changes made in that commit.
The general syntax for the "dolt commit" command is:
dolt commit [-m <message>] [--allow-empty]
Here, the "-m" flag is used to include a commit message that describes the changes made in the commit. The "--allow-empty" flag is optional and allows committing an empty change (committing without any changes made).
When you run the "dolt commit" command, Dolt creates a new commit with a unique commit hash that identifies it. The new commit becomes the latest commit in the repository, and the changes made in that commit are saved permanently.