Forrest logo
back to the hg tool

hg-add:tldr:05778

hg-add: Add files or directories to the staging area.
$ hg add ${filename}
try on your machine

This command is a Mercurial (hg) command used to add a file to the repository with the specified filename.

Here's a breakdown of the command:

  • hg refers to the Mercurial command-line tool used for version control.
  • add is the command used to add a file or directory to the repository.
  • ${filename} is a placeholder representing the actual filename or path of the file you want to add. You need to replace ${filename} with the actual filename or path when running the command.

To add a file to the repository, you would replace ${filename} with the name or path of the file you want to add. For example, if you want to add a file called "readme.txt" in the current directory, you would run the command: hg add readme.txt.

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