HG(FORGET)
π hg forget β HG(FORGET) π
okay bestie, welcome to the hg forget manual page, the one and only, she's giving quiet luxury π
β¨ NAME β¨
hg forget β forget the specified files on the next commit π
πΈ SYNOPSIS πΈ
hg forget [OPTION]... FILE...
π¦ DESCRIPTION π¦
So here's the vibe: you mark the files you name so they will no longer be tracked after the next commit. That's it. That's the whole personality. β¨
Lowkey important thing though β this only removes files from the current branch, NOT from the entire project history. And it does not delete them from the working directory. Your files are still there, chilling. They're just not on the guest list anymore. π
If you do want the file gone from the working directory too, that's a different girl β see hg remove.
And if you forget-forget too hard and need to undo a forget before the next commit? See hg add. She'll take you back. π«Ά
π Examples π
- forget newly-added binary files:
hg forget "set:added() and binary()"
- forget files that would be excluded by
.hgignore:
hg forget "set:hgignore()"
Returns 0 on success. slay. π
π OPTIONS π
-i,--interactiveβ use interactive mode (she asks, you answer, it's a whole conversation π¬)-I,--include <PATTERN[+]>β include names matching the given patterns-X,--exclude <PATTERN[+]>β exclude names matching the given patterns-n,--dry-runβ do not perform actions, just print output (a little peek, no commitment π)
[+] marked option can be specified multiple times β¨
and that's the whole page, bestie β no cap, every single flag accounted for π§π
cute sign-off time: this was the HG(FORGET) page, and honestly the footer is just HG(FORGET) again with no source, version or date stamp in sight, so likeβ¦ that's the tea π. mwah, go forth and forget responsibly π
π¦ 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