HG(RENAME)

πŸ’– HG(RENAME) β€” the rename glow-up page πŸ’–

okay bestie, welcome to the hg rename manual page, she's iconic, she's basically copy + remove wearing a cute little outfit ✨


🌸 NAME 🌸

hg rename β€” rename files; equivalent of copy + remove. that's it, that's the whole vibe πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

hg rename [OPTION]... SOURCE... DEST

πŸ¦‹ DESCRIPTION πŸ¦‹

So what she does: she marks dest as copies of the sources, and marks the sources for deletion. Two-for-one deal, no cap 🫢

  • If dest is a directory, the copies get put in that directory. cute, they all move in together.
  • If dest is a file, there can only be one source. one file, one destination, that's the rule bestie 😭

By default, this command actually copies the contents of the files as they exist in the working directory. Like, it really does the thing. But if you invoke it with -A/--after, the operation is just recorded and no copying happens β€” because the rename already happened and you're just telling hg about it after the fact πŸ™ˆ

Now, to undo marking a destination file as renamed, you use --forget. With that option, all the given (positional) arguments get unmarked as renames. Important details, do not skip:

  • The destination file(s) will be left in place (still tracked). she stays. she's not leaving.
  • The source file(s) will not be restored. yeah. gone. sorry bestie πŸ’€
  • Also lowkey: hg rename --forget behaves the same way as hg copy --forget. iykyk.

This command takes effect with the next commit by default. so it's giving "pending" energy until you commit ⭐

Returns 0 on success, 1 if errors are encountered. standard.


✨ OPTIONS ✨

  • --forget β€” unmark a destination file as renamed. the "jk, undo the label" button 🫢
  • -A, --after β€” record a rename that has already occurred. for when you did it first and asked questions later πŸ™ˆ
  • --at-rev <REV> β€” (un)mark renames in the given revision (EXPERIMENTAL). ⚠️ experimental means experimental, bestie, tread carefully.
  • -f, --force β€” forcibly move over an existing managed file. she will simply bulldoze it. dramatic but true πŸ’…
  • -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. window shopping, no purchasing ✨
[+] marked option can be specified multiple times. so go off, stack 'em πŸ‘‘

🌈 ALIASES 🌈

  • move
  • mv

and that's the page, bestie!! this was the HG(RENAME) manual page β€” that's the header energy at the top and the footer energy at the bottom, both just the name HG(RENAME), no version or date drama attached to it. she's short, she's sweet, she's copy + remove in a trench coat. go rename something πŸ’–πŸ¦‹πŸŽ€