LinuxCommandLibrary

hg-remove

schedules files for removal from the repository

TLDR

Remove file

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

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.

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), hg-forget(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community