Forrest logo
back to the hg tool

hg-remove:tldr:07504

hg-remove: Remove files from the repository that have been physically removed.
$ hg remove --after
try on your machine

The command "hg remove --after" is a command used in the Mercurial version control system.

This command is used to schedule files for deletion in the repository during the next commit. The "--after" option is used to remove files that have already been deleted from the working directory.

When you run "hg remove", it marks the specified files for removal from the repository on the next commit. However, if you have manually deleted files from the working directory without using the "hg remove" command, those files still exist in the repository's history.

By running "hg remove --after", you instruct Mercurial to also remove any files from the repository that no longer exist in the working directory. This ensures that deleted files are completely removed from both the working directory and the repository's history in the next commit.

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