Forrest logo
back to the hg tool

hg-commit:tldr:9089a

hg-commit: Commit with a specific message.
$ hg commit --message ${message}
try on your machine

This command is used in the Mercurial version control system (hg) to commit changes to a repository with a specified commit message.

Explanation:

  • hg commit: This is the primary command to commit changes in Mercurial.
  • --message or -m: This option is used to specify the commit message.
  • ${message}: This syntax is often used in command-line interfaces to refer to a variable named "message" that holds a certain value. The actual value of the variable must be provided when executing the command.

For example, if there is a variable named "message" with the value "Updated readme file," the command would be written as:

hg commit --message "Updated readme file"

This instructs Mercurial to commit the changes made in the repository with the commit message "Updated readme file." The changes are then recorded in the repository's history.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the hg tool