HG(STATUS)
β¨ NAME β¨
hg status β bestie, this is the one that shows you the changed files in your working directory π
π SYNOPSIS π
hg status [OPTION]... [FILE]...
π¦ DESCRIPTION π¦
Okay so, hg status shows you the status of the files in your repository. If you pass in some names, only the files that match get shown. Files that are clean, or ignored, or that are the source of a copy/move operation β they do NOT show up unless you hand it -c/--clean, -i/--ignored, -C/--copies or -A/--all. And unless you use one of the options described as "show only ...", the options -mardu are the ones in play. Periodt.
Option -q/--quiet hides untracked (unknown and ignored) files, unless you explicitly ask for them with -u/--unknown or -i/--ignored.
Heads up, bestie:hg statusmay appear to disagree withdiffif permissions have changed or a merge has occurred. The standard diff format does not report permission changes, and diff only reports changes relative to one merge parent. That's just how it is, no cap.
If you give one revision, it's used as the base revision. If you give two revisions, the differences between them are shown. The --change option can also be used as a shortcut to list the changed files of a revision from its first parent.
The codes used to show the status of files are:
M = modified
A = added
R = removed
C = clean
! = missing (deleted by non-hg command, but still tracked)
? = not tracked
I = ignored
= origin of the previous file (with --copies)
The -t/--terse option abbreviates the output by showing only the directory name if all the files in it share the same status. The option takes an argument indicating the statuses to abbreviate: 'm' for 'modified', 'a' for 'added', 'r' for 'removed', 'd' for 'deleted', 'u' for 'unknown', 'i' for 'ignored' and 'c' for clean.
It abbreviates only those statuses which are passed. Note that clean and ignored files are not displayed with '--terse ic' unless the -c/--clean and -i/--ignored options are also used. iykyk πΈ
The -v/--verbose option shows information when the repository is in an unfinished merge, shelve, rebase state etc. You can have this behavior turned on by default by enabling the commands.status.verbose option.
You can skip displaying some of these states by setting commands.status.skipstates to one or more of: 'bisect', 'graft', 'histedit', 'merge', 'rebase', or 'unshelve'.
π Template π
The following keywords are supported in addition to the common template keywords and functions. See also hg help templates.
pathβ String. Repository-absolute path of the file.sourceβ String. Repository-absolute path of the file originated from. Available if--copiesis specified.statusβ String. Character denoting file's status.
β Examples β
- show changes in the working directory relative to a changeset:
hg status --rev 9353
- show changes in the working directory relative to the current directory (see
hg help patternsfor more information):
hg status re:
- show all changes including copies in an existing changeset:
hg status --copies --change 9353
- get a NUL separated list of added files, suitable for xargs:
hg status -an0
- show more information about the repository status, abbreviating added, removed, modified, deleted, and untracked paths:
hg status -v -t mardu
Returns 0 on success. π
π₯ OPTIONS π₯
-A,--allβ show status of all files-m,--modifiedβ show only modified files-a,--addedβ show only added files-r,--removedβ show only removed files-d,--deletedβ show only missing files-c,--cleanβ show only files without changes-u,--unknownβ show only unknown (not tracked) files-i,--ignoredβ show only ignored files-n,--no-statusβ hide status prefix-t,--terse <VALUE>β show the terse output (EXPERIMENTAL) (default: nothing)-C,--copiesβ show source of copied files (DEFAULT:ui.statuscopies)-0,--print0β end filenames with NUL, for use with xargs--rev <REV[+]>β show difference from revision--change <REV>β list the changed files of a revision-I,--include <PATTERN[+]>β include names matching the given patterns-X,--exclude <PATTERN[+]>β exclude names matching the given patterns-S,--subreposβ recurse into subrepositories-T,--template <TEMPLATE>β display with template
[+] marked option can be specified multiple times
π ALIASES π
st
okay bestie that's literally the whole HG(STATUS) page, straight from the HG(STATUS) source, and you ate it πβ¨ go forth and check your status, main character π«Ά
π¦ where this page comes from
- arch rolling: mercurial 7.2.4-1 Β· GPL
- fedora 43: mercurial 7.1.1-1.fc43 Β· GPL-2.0-or-later
- fedora 43: mercurial 7.1.1-2.fc43 Β· GPL-2.0-or-later
- fedora 44: mercurial 7.2-1.fc44 Β· GPL-2.0-or-later
- fedora 44: mercurial 7.2.4-1.fc44 Β· GPL-2.0-or-later
- nixos 26.05: mercurial 7.1.2
- nixos 26.05: mercurial-full 7.1.2
- nixpkgs unstable: mercurial 7.2.2
- nixpkgs unstable: mercurial-full 7.2.2
- opensuse-leap 16.0: mercurial 7.0.1-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: mercurial 7.0.1-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: mercurial 7.0.1-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: mercurial 7.0.1-160000.2.2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms