hg-remove

schedules files for removal from the repository

TLDR

Remove file
$ hg remove [file]
Remove with force
$ hg remove -f [file]
Remove after deletion
$ hg remove -A
Remove directory
$ hg remove [directory]
Dry run
$ hg remove -n [file]

SYNOPSIS

hg remove [options] files

DESCRIPTION

hg remove schedules files for removal from the repository. The files are deleted from the working directory and marked for removal on next commit.The -A flag records removal of files already deleted from the filesystem. Force removes modified files.

PARAMETERS

FILES

Files to remove.
-f, --force
Remove even if modified.
-A, --after
Record removal of missing files.
-I, --include PATTERN
Include pattern.
-X, --exclude PATTERN
Exclude pattern.
-n, --dry-run
Show what would be done.
--help
Display help information.

INSTALL

sudo apt install mercurial
sudo dnf install mercurial
sudo pacman -S mercurial
sudo apk add mercurial
sudo zypper install mercurial
brew install mercurial
nix profile install nixpkgs#mercurial

CAVEATS

Removal requires commit. History preserved. Use forget to just untrack.

HISTORY

Remove is a core Mercurial command for managing tracked files since version 1.0.

SEE ALSO

hg(1), hg-add(1)