HG(PURGE)

✨ hg purge ✨

okay bestie, welcome to the hg purge page from the Mercurial manual πŸ’– this one's a little chaotic but we're gonna get through it together, i promise 🫢


🌸 NAME 🌸

hg purge β€” removes files not tracked by Mercurial πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

hg purge [OPTION]... [DIR]...

πŸ¦‹ DESCRIPTION πŸ¦‹

so basically: it deletes files that Mercurial doesn't know about. no cap. it's giving "test local and uncommitted changes in an otherwise-clean source tree" energy ✨

which means, by default, purge is gonna delete these:

  • Unknown files β€” the ones marked with "?" by hg status πŸ‘€
  • Empty directories β€” like, Mercurial literally ignores directories unless they contain files under source control management πŸ—‚οΈ

but bestie, it will leave these untouched:

  • Modified and unmodified tracked files β€” safe, protected, main character energy πŸ‘‘
  • Ignored files β€” unless -i or --all is specified πŸ™ˆ
  • New files added to the repository (with hg add) 🫢

the --files and --dirs options let you direct purge to delete only files, only directories, or both. if you don't give either option, both get deleted πŸ’€

if directories are given on the command line, only files in these directories are considered πŸ“

⚠️ be careful with purge, fr fr. you could irreversibly delete some files you forgot to add to the repository 😭 if you only want to print the list of files that this program would delete, use the --print option. do that first. seriously. πŸ’œ

πŸ’… OPTIONS πŸ’…

  • -a, --abort-on-err β€” abort if an error occurs πŸ›‘
  • --all β€” purge ignored files too πŸ‘€
  • -i, --ignored β€” purge only ignored files πŸ™ˆ
  • --dirs β€” purge empty directories πŸ—‚οΈ
  • --files β€” purge files πŸ“„
  • -p, --print β€” print filenames instead of deleting them πŸ–¨οΈ (the safe bestie option)
  • -0, --print0 β€” end filenames with NUL, for use with xargs (implies -p/--print) ✨
  • --confirm β€” ask before permanently deleting files πŸ™‹β€β™€οΈ
  • -I, --include PATTERN[+] β€” include names matching the given patterns 🌈
  • -X, --exclude PATTERN[+] β€” exclude names matching the given patterns 🚫
[+] marked option can be specified multiple times πŸ”

⭐ ALIASES ⭐

clean 🧼


and that's the whole page, bestie!! go forth and purge responsibly, or like… don't, and use --print instead, iykyk πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά

this has been HG(PURGE) from the Mercurial manual β€” thanks for reading, love u, bye πŸ’œ