HG(REVERT)

πŸ’– hg revert πŸ’– aka HG(REVERT) bestie!!

okay so welcome to the manual page for hg revert, the command that restores files to their checkout state. This whole page is HG(REVERT), and we're gonna go through it like a group chat. no cap. ✨


🌸 NAME 🌸

hg revert β€” restore files to their checkout state πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

hg revert [OPTION]... [-r REV] [NAME]...

✨ DESCRIPTION ✨

⚠️ Note: To check out earlier revisions, you should use hg update REV. To cancel an uncommitted merge (and lose your changes), use hg merge --abort.

With no revision specified, revert the specified files or directories to the contents they had in the parent of the working directory. This restores the contents of files to an unmodified state and unschedules adds, removes, copies, and renames. If the working directory has two parents, you must explicitly specify a revision. like, you have to pick one, bestie.

Using the -r/--rev or -d/--date options, revert the given files or directories to their states as of a specific revision. Because revert does not change the working directory parents, this will cause these files to appear modified. This can be helpful to "back out" some or all of an earlier change. See hg backout for a related method. it's giving modified on purpose, and that's the point.

Modified files are saved with a .orig suffix before reverting. To disable these backups, use --no-backup. It is possible to store the backup files in a custom directory relative to the root of the repository by setting the ui.origbackuppath configuration option. so you get a lil .orig souvenir unless you say --no-backup, periodt.

See hg help dates for a list of formats valid for -d/--date. the date formats live over there, go check.

See hg help backout for a way to reverse the effect of an earlier changeset. if you wanna reverse an earlier changeset, hg help backout has the tea.

Returns 0 on success. slay.


πŸ’… OPTIONS πŸ’…

  • -a, --all β€” revert all changes when no arguments given ✨
  • -d,--date <DATE> β€” tipmost revision matching date πŸ“…
  • -r,--rev <REV> β€” revert to the specified revision πŸ”₯
  • -C, --no-backup β€” do not save backup copies of files πŸ’…
  • -i, --interactive β€” interactively select the changes πŸŽ€
  • -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 πŸ‘‘

[+] marked option can be specified multiple times ✨


okay bye bestie, this was HG(REVERT) β€” the footer just says HG(REVERT), no version or date, so that's the whole sign-off. mwah πŸ’‹πŸ«Άβœ¨