Forrest logo
back to the hg tool

hg-add:tldr:4b638

hg-add: Recursively add sub-repositories.
$ hg add --subrepos
try on your machine

The command "hg add --subrepos" is a command used in the Mercurial version control system. It is used to add subrepositories to the repository.

A subrepository is a separate repository that is nested within the main repository. It allows you to manage external dependencies or modular components of your project. By using subrepositories, you can keep different parts of your project in separate repositories while still being able to manage and track them together.

When you run the "hg add --subrepos" command, it tells Mercurial to identify and add any subrepositories found in the current directory or any nested directories. This means that the subrepositories and their contents will be treated as part of the main repository.

By adding subrepositories, you can control and track changes to both the main repository and its subrepositories. This command is typically used when setting up or updating a repository that uses subrepositories.

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